Plugins: Add metric to track plugin backend target (#95976)

* add metric to track plugin backend target

* tidy

* fix test
This commit is contained in:
Will Browne
2024-11-07 12:01:46 +00:00
committed by GitHub
parent 5722569676
commit b87c76ad21
4 changed files with 32 additions and 0 deletions
+8
View File
@@ -127,6 +127,10 @@ func (pc *FakePluginClient) IsDecommissioned() bool {
return pc.decommissioned
}
func (pc *FakePluginClient) Target() backendplugin.Target {
return "test-target"
}
func (pc *FakePluginClient) CollectMetrics(ctx context.Context, req *backend.CollectMetricsRequest) (*backend.CollectMetricsResult, error) {
if pc.CollectMetricsHandlerFunc != nil {
return pc.CollectMetricsHandlerFunc(ctx, req)
@@ -646,3 +650,7 @@ func (p *FakeBackendPlugin) Kill() {
defer p.mutex.Unlock()
p.Running = false
}
func (p *FakeBackendPlugin) Target() backendplugin.Target {
return "test-target"
}