Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type State ¶
State represents a type for interacting with the underlying state.
func NewState ¶
func NewState(factory database.TxnRunnerFactory) *State
NewState returns a new State for interacting with the underlying state.
func (*State) AllKeysQuery ¶
AllKeysQuery returns a SQL statement that will return all known controller configuration keys.
func (*State) ControllerConfig ¶
ControllerConfig returns the current configuration in the database.
func (*State) UpdateControllerConfig ¶
func (st *State) UpdateControllerConfig( ctx context.Context, updateAttrs map[string]string, removeAttrs []string, validateModification func(map[string]string) error, ) error
UpdateControllerConfig allows changing some of the configuration for the controller. Changes passed in updateAttrs will be applied to the current config, and keys in removeAttrs will be unset (and so revert to their defaults). Only a subset of keys can be changed after bootstrapping. ValidateModification is a function that will be called with the current config, and should return an error if the modification is not allowed.
type StringSlice ¶
type StringSlice []string