memory

package
v0.0.0-...-57a5977 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

Driver is a store driver that keeps features and gates in memory.

func NewDriver

func NewDriver() *Driver

NewDriver initializes a new memory driver.

func (*Driver) Configure

func (a *Driver) Configure(config map[string]interface{}) error

Configure configures the memory driver. This driver doesn't have any configuration, so this is a NOOP.

func (*Driver) Disable

func (a *Driver) Disable(feature feature.Feature, gate gates.Gate) error

Disable closes a feature for a given gate.

func (*Driver) Enable

func (a *Driver) Enable(feature feature.Feature, gate gates.Gate) error

Enable opens a feature for a give gate.

func (*Driver) Get

func (a *Driver) Get(feature feature.Feature, keys []gates.GateKey) ([]gates.Gate, error)

Get returns the enabled gates for a feature given a set of gate keys. Gates are skipped if they are not open for a feature.

Jump to

Keyboard shortcuts

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