store

package
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2023 License: Apache-2.0 Imports: 6 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flags

type Flags struct {
	Flags       map[string]model.Flag `json:"flags"`
	FlagSources []string              `json:"flagSources"`
	// contains filtered or unexported fields
}

func NewFlags

func NewFlags() *Flags

func (*Flags) Add

func (f *Flags) Add(logger *logger.Logger, source string, flags map[string]model.Flag) map[string]interface{}

Add new flags from source.

func (*Flags) Delete

func (f *Flags) Delete(key string)

func (*Flags) DeleteFlags

func (f *Flags) DeleteFlags(logger *logger.Logger, source string, flags map[string]model.Flag) map[string]interface{}

DeleteFlags matching flags from source.

func (*Flags) Get

func (f *Flags) Get(key string) (model.Flag, bool)

func (*Flags) GetAll

func (f *Flags) GetAll() map[string]model.Flag

GetAll returns a copy of the store's state (copy in order to be concurrency safe)

func (*Flags) Merge

func (f *Flags) Merge(
	logger *logger.Logger,
	source string,
	flags map[string]model.Flag,
) (map[string]interface{}, bool)

Merge provided flags from source with currently stored flags.

func (*Flags) Set

func (f *Flags) Set(key string, flag model.Flag)

func (*Flags) String

func (f *Flags) String() (string, error)

func (*Flags) Update

func (f *Flags) Update(logger *logger.Logger, source string, flags map[string]model.Flag) map[string]interface{}

Update existing flags from source.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL