Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) FeatureIsOn(key string, contextSet ContextSet) (bool, bool)
- func (c *Client) GetBoolValue(key string, contextSet ContextSet) (bool, bool, error)
- func (c *Client) GetBoolValueWithDefault(key string, contextSet ContextSet, defaultValue bool) (bool, bool)
- func (c *Client) GetDurationValue(key string, contextSet ContextSet) (time.Duration, bool, error)
- func (c *Client) GetDurationWithDefault(key string, contextSet ContextSet, defaultValue time.Duration) (time.Duration, bool)
- func (c *Client) GetFloatValue(key string, contextSet ContextSet) (float64, bool, error)
- func (c *Client) GetFloatValueWithDefault(key string, contextSet ContextSet, defaultValue float64) (float64, bool)
- func (c *Client) GetIntValue(key string, contextSet ContextSet) (int64, bool, error)
- func (c *Client) GetIntValueWithDefault(key string, contextSet ContextSet, defaultValue int64) (int64, bool)
- func (c *Client) GetJSONValue(key string, contextSet ContextSet) (interface{}, bool, error)
- func (c *Client) GetJSONValueWithDefault(key string, contextSet ContextSet, defaultValue interface{}) (interface{}, bool)
- func (c *Client) GetLogLevelStringValue(key string, contextSet ContextSet) (string, bool, error)
- func (c *Client) GetStringSliceValue(key string, contextSet ContextSet) ([]string, bool, error)
- func (c *Client) GetStringSliceValueWithDefault(key string, contextSet ContextSet, defaultValue []string) ([]string, bool)
- func (c *Client) GetStringValue(key string, contextSet ContextSet) (string, bool, error)
- func (c *Client) GetStringValueWithDefault(key string, contextSet ContextSet, defaultValue string) (string, bool)
- func (c *Client) WithContext(contextSet *ContextSet) *boundClient
- type ClientInterface
- type ContextSet
- type OnInitializationFailure
- type Option
- func WithAPIKey(apiKey string) Option
- func WithAPIURL(apiURL string) Option
- func WithConfigDirectory(configDirectory string) Option
- func WithConfigOverrideDirectory(configOverrideDirectory string) Option
- func WithDatasource(datasource options.Datasource) Option
- func WithEnvironmentNames(environmentNames []string) Option
- func WithGlobalContext(globalContext *ContextSet) Option
- func WithInitializationTimeoutSeconds(timeoutSeconds float64) Option
- func WithOnInitializationFailure(onInitializationFailure options.OnInitializationFailure) Option
- type Options
Constants ¶
View Source
const ( ResolutionResultTypeSuccess resolutionResultType = iota ResolutionResultTypeError )
View Source
const ( SUCCESS awaitInitializationResult = iota TIMEOUT )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) FeatureIsOn ¶
func (c *Client) FeatureIsOn(key string, contextSet ContextSet) (bool, bool)
func (*Client) GetBoolValue ¶
func (*Client) GetBoolValueWithDefault ¶
func (*Client) GetDurationValue ¶
func (*Client) GetDurationWithDefault ¶
func (*Client) GetFloatValue ¶
func (*Client) GetFloatValueWithDefault ¶
func (*Client) GetIntValue ¶
func (*Client) GetIntValueWithDefault ¶
func (*Client) GetJSONValue ¶
func (c *Client) GetJSONValue(key string, contextSet ContextSet) (interface{}, bool, error)
func (*Client) GetJSONValueWithDefault ¶
func (c *Client) GetJSONValueWithDefault(key string, contextSet ContextSet, defaultValue interface{}) (interface{}, bool)
func (*Client) GetLogLevelStringValue ¶
func (*Client) GetStringSliceValue ¶
func (*Client) GetStringSliceValueWithDefault ¶
func (*Client) GetStringValue ¶
func (*Client) GetStringValueWithDefault ¶
func (*Client) WithContext ¶
func (c *Client) WithContext(contextSet *ContextSet) *boundClient
type ClientInterface ¶
type ClientInterface interface {
GetIntValue(key string, contextSet ContextSet) (int64, bool, error)
GetBoolValue(key string, contextSet ContextSet) (bool, bool, error)
GetStringValue(key string, contextSet ContextSet) (string, bool, error)
GetFloatValue(key string, contextSet ContextSet) (float64, bool, error)
GetStringSliceValue(key string, contextSet ContextSet) ([]string, bool, error)
GetDurationValue(key string, contextSet ContextSet) (time.Duration, bool, error)
GetIntValueWithDefault(key string, contextSet ContextSet, defaultValue int64) (int64, bool)
GetBoolValueWithDefault(key string, contextSet ContextSet, defaultValue bool) (bool, bool)
GetStringValueWithDefault(key string, contextSet ContextSet, defaultValue string) (string, bool)
GetFloatValueWithDefault(key string, contextSet ContextSet, defaultValue float64) (float64, bool)
GetStringSliceValueWithDefault(key string, contextSet ContextSet, defaultValue []string) ([]string, bool)
GetDurationWithDefault(key string, contextSet ContextSet, defaultValue time.Duration) (time.Duration, bool)
GetLogLevelStringValue(key string, contextSet ContextSet) (string, bool, error)
GetJSONValue(key string, contextSet ContextSet) (interface{}, bool, error)
GetJSONValueWithDefault(key string, contextSet ContextSet, defaultValue interface{}) (interface{}, bool)
FeatureIsOn(key string, contextSet ContextSet) (bool, bool)
WithContext(contextSet *ContextSet) *boundClient
}
type ContextSet ¶
type ContextSet = contexts.ContextSet
type OnInitializationFailure ¶
type OnInitializationFailure = options.OnInitializationFailure
const ( RAISE OnInitializationFailure = options.RAISE UNLOCK OnInitializationFailure = options.UNLOCK )
type Option ¶
func WithAPIKey ¶
func WithAPIURL ¶
func WithConfigDirectory ¶
func WithDatasource ¶
func WithDatasource(datasource options.Datasource) Option
func WithEnvironmentNames ¶
func WithGlobalContext ¶
func WithGlobalContext(globalContext *ContextSet) Option
func WithOnInitializationFailure ¶
func WithOnInitializationFailure(onInitializationFailure options.OnInitializationFailure) Option
Click to show internal directories.
Click to hide internal directories.