Documentation ¶
Index ¶
- func GetHarnessDir(logger logger.Logger) string
- type FileStore
- func (ds *FileStore) Get(key string) (interface{}, bool)
- func (ds *FileStore) List() []interface{}
- func (ds *FileStore) Load() error
- func (ds *FileStore) Persist() error
- func (ds *FileStore) PersistedAt() time.Time
- func (ds *FileStore) Remove(key string) error
- func (ds *FileStore) Reset(data map[string]interface{}, persist bool) error
- func (ds *FileStore) Set(key string, value interface{}) error
- func (ds *FileStore) SetLogger(logger logger.Logger)
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHarnessDir ¶
GetHarnessDir returns home folder for harness ff server files
Types ¶
type FileStore ¶
type FileStore struct {
// contains filtered or unexported fields
}
FileStore object is simple JSON file representation
func NewFileStore ¶
NewFileStore creates a new file store instance
func (*FileStore) PersistedAt ¶
PersistedAt returns when it was last recorded
func (*FileStore) Remove ¶ added in v0.0.24
Remove object from data store identified by key parameter
type Storage ¶
type Storage interface { // Reset is called after the repository has fetched the feature toggles from the server. // If persist is true the implementation of this function should call Persist(). The data // passed in here should be owned by the implementer of this interface. Reset(data map[string]interface{}, persist bool) error // Load is called to load the data from persistent storage and hold it in memory for fast // querying. Load() error // Persist is called when the data in the storage implementation should be persisted to disk. Persist() error // Get returns the data for the specified feature toggle. Get(string) (interface{}, bool) Set(string, interface{}) error Remove(string) error // List returns a list of all feature toggles. List() []interface{} PersistedAt() time.Time SetLogger(logger logger.Logger) }
Storage is an interface that can be implemented in order to have control over how the repository of feature toggles is persisted.
Click to show internal directories.
Click to hide internal directories.