observer.go 514 B

1234567891011121314
  1. package config
  2. import (
  3. "github.com/opencost/opencost/pkg/cloud"
  4. )
  5. // Observer should be implemented by any struct which need access to the up-to-date list of active configs
  6. // that the Config.Controller provides. Any cloud billing Integration in the application that is used in the application
  7. // should pass through this interface, and be revoked if it is not included in a Delete call.
  8. type Observer interface {
  9. PutConfig(cloud.KeyedConfig)
  10. DeleteConfig(string)
  11. SetConfigs(map[string]cloud.KeyedConfig)
  12. }