We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
GetMetricInterval()
1 parent f93345c commit b0f28e1Copy full SHA for b0f28e1
1 file changed
internal/sources/conn.go
@@ -102,6 +102,14 @@ func (md *SourceConn) GetDatabaseName() string {
102
return md.ConnConfig.ConnConfig.Database
103
}
104
105
+// GetMetricInterval returns the metric interval for the connection
106
+func (md *SourceConn) GetMetricInterval(name string) float64 {
107
+ if md.IsInRecovery && len(md.MetricsStandby) > 0 {
108
+ return md.MetricsStandby[name]
109
+ }
110
+ return md.Metrics[name]
111
+}
112
+
113
// SetDatabaseName sets the database name in the connection config for resolved databases
114
func (md *SourceConn) SetDatabaseName(name string) {
115
if err := md.ParseConfig(); err != nil {
0 commit comments