Documentation ¶
Index ¶
- Variables
- type FSSource
- type FliptIndex
- type Store
- func (l *Store) Close() error
- func (s Store) CountFlags(ctx context.Context, namespaceKey string) (uint64, error)
- func (s Store) CountNamespaces(ctx context.Context) (uint64, error)
- func (s Store) CountRollouts(ctx context.Context, namespaceKey, flagKey string) (uint64, error)
- func (s Store) CountRules(ctx context.Context, namespaceKey, flagKey string) (uint64, error)
- func (s Store) CountSegments(ctx context.Context, namespaceKey string) (uint64, error)
- func (s Store) CreateRollout(ctx context.Context, r *flipt.CreateRolloutRequest) (*flipt.Rollout, error)
- func (s Store) DeleteRollout(ctx context.Context, r *flipt.DeleteRolloutRequest) error
- func (s Store) GetEvaluationDistributions(ctx context.Context, ruleID string) ([]*storage.EvaluationDistribution, error)
- func (s Store) GetEvaluationRules(ctx context.Context, namespaceKey string, flagKey string) ([]*storage.EvaluationRule, error)
- func (s Store) GetFlag(ctx context.Context, namespaceKey string, key string) (*flipt.Flag, error)
- func (s Store) GetNamespace(ctx context.Context, key string) (*flipt.Namespace, error)
- func (s Store) GetRollout(ctx context.Context, namespaceKey, id string) (*flipt.Rollout, error)
- func (s Store) GetRule(ctx context.Context, namespaceKey string, id string) (*flipt.Rule, error)
- func (s Store) GetSegment(ctx context.Context, namespaceKey string, key string) (*flipt.Segment, error)
- func (s Store) ListFlags(ctx context.Context, namespaceKey string, opts ...storage.QueryOption) (storage.ResultSet[*flipt.Flag], error)
- func (s Store) ListNamespaces(ctx context.Context, opts ...storage.QueryOption) (storage.ResultSet[*flipt.Namespace], error)
- func (s Store) ListRollouts(ctx context.Context, namespaceKey, flagKey string, opts ...storage.QueryOption) (storage.ResultSet[*flipt.Rollout], error)
- func (s Store) ListRules(ctx context.Context, namespaceKey string, flagKey string, ...) (storage.ResultSet[*flipt.Rule], error)
- func (s Store) ListSegments(ctx context.Context, namespaceKey string, opts ...storage.QueryOption) (storage.ResultSet[*flipt.Segment], error)
- func (s Store) OrderRollouts(ctx context.Context, r *flipt.OrderRolloutsRequest) error
- func (l *Store) String() string
- func (s Store) UpdateRollout(ctx context.Context, r *flipt.UpdateRolloutRequest) (*flipt.Rollout, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotImplemented = errors.New("not implemented")
)
Functions ¶
This section is empty.
Types ¶
type FSSource ¶
type FSSource interface { fmt.Stringer // Get builds a single instance of an fs.FS Get() (fs.FS, error) // Subscribe feeds implementations of fs.FS onto the provided channel. // It should block until the provided context is cancelled (it will be called in a goroutine). // It should close the provided channel before it returns. Subscribe(context.Context, chan<- fs.FS) }
FSSource produces implementations of fs.FS. A single FS can be produced via Get or a channel may be provided to Subscribe in order to received new instances when new state becomes available.
type FliptIndex ¶
type FliptIndex struct { Version string `yaml:"version,omitempty"` Include []string `yaml:"include,omitempty"` Exclude []string `yaml:"exclude,omitempty"` }
FliptIndex represents the structure of a well-known file ".flipt.yml" at the root of an FS.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is an implementation of storage.Store backed by an FSSource. The store subscribes to the source for instances of fs.FS with new contents. When a new fs is received the contents is fetched and built into a snapshot of Flipt feature flag state.
func NewStore ¶
NewStore constructs and configure a Store. The store creates a background goroutine which feeds a channel of fs.FS.
func (Store) CountFlags ¶
func (Store) CountRollouts ¶ added in v1.24.0
func (Store) CountRules ¶
func (Store) CountSegments ¶
func (Store) CreateRollout ¶ added in v1.24.0
func (Store) DeleteRollout ¶ added in v1.24.0
func (s Store) DeleteRollout(ctx context.Context, r *flipt.DeleteRolloutRequest) error
func (Store) GetEvaluationDistributions ¶
func (Store) GetEvaluationRules ¶
func (Store) GetNamespace ¶
func (Store) GetRollout ¶ added in v1.24.0
func (Store) GetSegment ¶
func (Store) ListNamespaces ¶
func (Store) ListRollouts ¶ added in v1.24.0
func (Store) ListSegments ¶
func (Store) OrderRollouts ¶ added in v1.24.0
func (s Store) OrderRollouts(ctx context.Context, r *flipt.OrderRolloutsRequest) error
func (Store) UpdateRollout ¶ added in v1.24.0
Click to show internal directories.
Click to hide internal directories.