Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var InitialNamespaceChanges = eventsource.InitialNamespaceChanges
It's for testing.
Functions ¶
This section is empty.
Types ¶
type ModificationValidatorFunc ¶
ModificationValidatorFunc is a function that validates a modification to the controller config.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service defines a service for interacting with the underlying state.
func NewService ¶
NewService returns a new Service for interacting with the underlying state.
func (*Service) ControllerConfig ¶
ControllerConfig returns the config values for the controller.
func (*Service) UpdateControllerConfig ¶
func (s *Service) UpdateControllerConfig(ctx context.Context, updateAttrs controller.Config, removeAttrs []string) error
UpdateControllerConfig updates the controller config.
type State ¶
type State interface { ControllerConfig(context.Context) (map[string]string, error) UpdateControllerConfig(ctx context.Context, updateAttrs map[string]string, removeAttrs []string, validateModification ModificationValidatorFunc) error // AllKeysQuery is used to get the initial state // for the controller configuration watcher. AllKeysQuery() string }
State defines an interface for interacting with the underlying state.
type WatchableService ¶
type WatchableService struct { Service // contains filtered or unexported fields }
WatchableService defines a service for interacting with the underlying state and the ability to create watchers.
func NewWatchableService ¶
func NewWatchableService(st State, wf WatcherFactory) *WatchableService
NewWatchableService returns a new Service for interacting with the underlying state and the ability to create watchers.
func (*WatchableService) WatchControllerConfig ¶
func (s *WatchableService) WatchControllerConfig() (watcher.StringsWatcher, error)
Watch returns a watcher that returns keys for any changes to controller config.
type WatcherFactory ¶
type WatcherFactory interface { // NewNamespaceWatcher returns a new namespace watcher // for events based on the input change mask. NewNamespaceWatcher(string, changestream.ChangeType, eventsource.NamespaceQuery) (watcher.StringsWatcher, error) }
WatcherFactory describes methods for creating watchers.