Documentation
¶
Index ¶
- type IStore
- type SourceDetails
- type State
- func (f *State) Add(logger *logger.Logger, source string, selector string, ...) map[string]interface{}
- func (f *State) Delete(key string)
- func (f *State) DeleteFlags(logger *logger.Logger, source string, flags map[string]model.Flag) map[string]interface{}
- func (f *State) Get(_ context.Context, key string) (model.Flag, model.Metadata, bool)
- func (f *State) GetAll(_ context.Context) (map[string]model.Flag, model.Metadata, error)
- func (f *State) Merge(logger *logger.Logger, source string, selector string, ...) (map[string]interface{}, bool)
- func (f *State) SelectorForFlag(_ context.Context, flag model.Flag) string
- func (f *State) Set(key string, flag model.Flag)
- func (f *State) String() (string, error)
- func (f *State) Update(logger *logger.Logger, source string, selector string, ...) map[string]interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SourceDetails ¶ added in v0.6.2
type State ¶ added in v0.11.0
type State struct { Flags map[string]model.Flag `json:"flags"` FlagSources []string SourceDetails map[string]SourceDetails `json:"sourceMetadata,omitempty"` MetadataPerSource map[string]model.Metadata `json:"metadata,omitempty"` // contains filtered or unexported fields }
func (*State) Add ¶ added in v0.11.0
func (f *State) Add(logger *logger.Logger, source string, selector string, flags map[string]model.Flag, ) map[string]interface{}
Add new flags from source.
func (*State) DeleteFlags ¶ added in v0.11.0
func (f *State) DeleteFlags(logger *logger.Logger, source string, flags map[string]model.Flag) map[string]interface{}
DeleteFlags matching flags from source.
func (*State) GetAll ¶ added in v0.11.0
GetAll returns a copy of the store's state (copy in order to be concurrency safe)
func (*State) Merge ¶ added in v0.11.0
func (f *State) Merge( logger *logger.Logger, source string, selector string, flags map[string]model.Flag, metadata model.Metadata, ) (map[string]interface{}, bool)
Merge provided flags from source with currently stored flags. nolint: funlen
func (*State) SelectorForFlag ¶ added in v0.11.0
Click to show internal directories.
Click to hide internal directories.