signoz/pkg/query-service/app/opamp/config_provider.go
Raj Kamal Singh cb155a1172
feat: opamp server with agent config provider (#3737)
* feat: add interface for opamp.AgentConfigProvider

* feat: add iface and plumbing for generating recommended conf in opamp/agent

* feat: get opamp server config provider tests started

* chore: add test scenario for agent connection without a config recommendation

* chore: add test scenario for agent connection with a config recommendation

* chore: add test for validating config deployment status gets reported

* chore: add test for rolling out latest config recommendations when config changes

* chore: wrap up opamp server lifecycle tests

* chore: some tests cleanup

* chore: get all tests passing

* chore: update opamp server init logic in ee query service

* chore: some cleanup

* chore: some final cleanup
2023-10-14 09:16:14 +05:30

13 lines
452 B
Go

package opamp
import "go.signoz.io/signoz/pkg/query-service/app/opamp/model"
// Interface for a source of otel collector config recommendations.
type AgentConfigProvider interface {
model.AgentConfigProvider
// Subscribe to be notified on changes in config provided by this source.
// Used for rolling out latest config recommendation to all connected agents when settings change
SubscribeToConfigUpdates(callback func()) (unsubscribe func())
}