Documentation ¶
Overview ¶
Package options provides necessary interfaces and implementations for implementing evaluator configuration options.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(interfaces.Evaluator) error
Option is a function that takes an evaluator and does some unspecified operation to it, returning an error in case of failure.
func WithDataSources ¶ added in v0.0.75
func WithDataSources(ds *v1datasources.DataSourceRegistry) Option
WithDataSources provides the evaluation engine with a list of data sources to register. In case the given evaluator does not support data sources, WithDataSources silently ignores the error.
func WithFlagsClient ¶
func WithFlagsClient(client openfeature.IClient) Option
WithFlagsClient provides the evaluation engine with an `openfeature` client. In case the given evaluator dows not support feature flags, WithFlagsClient silently ignores the error.
type SupportsDataSources ¶ added in v0.0.75
type SupportsDataSources interface {
RegisterDataSources(ds *v1datasources.DataSourceRegistry)
}
SupportsDataSources interface advertises the fact that the implementer can register data sources with the evaluator.
type SupportsFlags ¶
type SupportsFlags interface {
SetFlagsClient(client openfeature.IClient) error
}
SupportsFlags interface advertises the fact that the implementer can use an `openfeature` client to check for flags being set.