Versions in this module Expand all Collapse all v2 v2.0.2 Mar 25, 2024 Changes in this version + const CONFIG_RETRIES + const DEVCYCLE_USER_ID_KEY + const NATIVE_SDK + const VERSION + var ContextAPIKey = contextKey("apikey") + var ContextAccessToken = contextKey("accesstoken") + var ContextBasicAuth = contextKey("basic") + var ContextOAuth2 = contextKey("token") + var DEFAULT_USER_TIME = time.Time + var ErrInvalidDefaultValue = errors.New(...) + var ErrQueueFull = bucketing.ErrQueueFull + func GeneratePlatformData() *api.PlatformData + func SetLogger(log Logger) + type APIKey struct + Key string + Prefix string + type AdvancedOptions struct + OverridePlatformData *api.PlatformData + type BaseVariable = api.BaseVariable + type BasicAuth struct + Password string + UserName string + type BatchEventsBody = api.BatchEventsBody + type BucketedUserConfig = api.BucketedUserConfig + type Client struct + DevCycleOptions *Options + func NewClient(sdkKey string, options *Options) (*Client, error) + func NewDVCClient(sdkKey string, options *Options) (*Client, error) + func (c *Client) AllFeatures(user User) (map[string]Feature, error) + func (c *Client) AllVariables(user User) (map[string]ReadOnlyVariable, error) + func (c *Client) ChangeBasePath(path string) + func (c *Client) Close() (err error) + func (c *Client) EventQueueMetrics() (int32, int32, int32) + func (c *Client) FlushEvents() error + func (c *Client) GetRawConfig() (config []byte, etag string, err error) + func (c *Client) IsLocalBucketing() bool + func (c *Client) OpenFeatureProvider() DevCycleProvider + func (c *Client) SetClientCustomData(customData map[string]interface{}) error + func (c *Client) SetOptions(dvcOptions Options) + func (c *Client) Track(user User, event Event) (bool, error) + func (c *Client) Variable(userdata User, key string, defaultValue interface{}) (result Variable, err error) + func (c *Client) VariableValue(userdata User, key string, defaultValue interface{}) (interface{}, error) + type ClientImpl interface + IsLocalBucketing func() bool + Variable func(userdata User, key string, defaultValue interface{}) (Variable, error) + type ConfigReceiver interface + StoreConfig func([]byte, string) error + type DVCClient = Client + type DVCEvent = api.Event + type DVCOptions = Options + type DVCUser = api.User + type DevCycleProvider struct + Client ClientImpl + func (p DevCycleProvider) BooleanEvaluation(ctx context.Context, flag string, defaultValue bool, ...) openfeature.BoolResolutionDetail + func (p DevCycleProvider) FloatEvaluation(ctx context.Context, flag string, defaultValue float64, ...) openfeature.FloatResolutionDetail + func (p DevCycleProvider) Hooks() []openfeature.Hook + func (p DevCycleProvider) IntEvaluation(ctx context.Context, flag string, defaultValue int64, ...) openfeature.IntResolutionDetail + func (p DevCycleProvider) Metadata() openfeature.Metadata + func (p DevCycleProvider) ObjectEvaluation(ctx context.Context, flag string, defaultValue interface{}, ...) openfeature.InterfaceResolutionDetail + func (p DevCycleProvider) StringEvaluation(ctx context.Context, flag string, defaultValue string, ...) openfeature.StringResolutionDetail + type DiscardLogger = util.DiscardLogger + type EnvironmentConfigManager struct + func NewEnvironmentConfigManager(sdkKey string, localBucketing ConfigReceiver, options *Options, ...) (e *EnvironmentConfigManager) + func (e *EnvironmentConfigManager) Close() + func (e *EnvironmentConfigManager) HasConfig() bool + func (e *EnvironmentConfigManager) StartPolling(interval time.Duration) + type ErrorResponse = api.ErrorResponse + type Event = api.Event + type EventFlushCallback func(payloads map[string]FlushPayload) (*FlushResult, error) + type EventManager struct + func NewEventManager(options *Options, localBucketing InternalEventQueue, cfg *HTTPConfiguration, ...) (eventQueue *EventManager, err error) + func (e *EventManager) Close() (err error) + func (e *EventManager) FlushEvents() (err error) + func (e *EventManager) Metrics() (int32, int32, int32) + func (e *EventManager) QueueEvent(user User, event Event) error + func (e *EventManager) QueueVariableDefaultedEvent(variableKey string) error + type EventQueueOptions = api.EventQueueOptions + type Feature = api.Feature + type FeatureVariation = api.FeatureVariation + type FlushPayload = api.FlushPayload + type FlushResult struct + FailurePayloads []string + FailureWithRetryPayloads []string + SuccessPayloads []string + type GenericError struct + func (e GenericError) Body() []byte + func (e GenericError) Error() string + func (e GenericError) Model() interface{} + type HTTPConfiguration struct + BasePath string + ConfigCDNBasePath string + DefaultHeader map[string]string + EventsAPIBasePath string + HTTPClient *http.Client + Host string + Scheme string + UserAgent string + func NewConfiguration(options *Options) *HTTPConfiguration + func (c *HTTPConfiguration) AddDefaultHeader(key string, value string) + type InternalEventQueue interface + FlushEventQueue func(EventFlushCallback) error + Metrics func() (int32, int32, int32) + QueueAggregateEvent func(config BucketedUserConfig, event Event) error + QueueEvent func(user User, event Event) error + UserQueueLength func() (int, error) + type LocalBucketing interface + Close func() + GenerateBucketedConfigForUser func(user User) (ret *BucketedUserConfig, err error) + SetClientCustomData func(map[string]interface{}) error + Variable func(user User, key string, variableType string) (variable Variable, err error) + type Logger = util.Logger + type NativeLocalBucketing struct + func NewNativeLocalBucketing(sdkKey string, platformData *api.PlatformData, options *Options) (*NativeLocalBucketing, error) + func (n *NativeLocalBucketing) Close() + func (n *NativeLocalBucketing) FlushEventQueue(callback EventFlushCallback) error + func (n *NativeLocalBucketing) GenerateBucketedConfigForUser(user User) (ret *BucketedUserConfig, err error) + func (n *NativeLocalBucketing) Metrics() (int32, int32, int32) + func (n *NativeLocalBucketing) QueueAggregateEvent(config BucketedUserConfig, event Event) error + func (n *NativeLocalBucketing) QueueEvent(user User, event Event) error + func (n *NativeLocalBucketing) SetClientCustomData(customData map[string]interface{}) error + func (n *NativeLocalBucketing) StoreConfig(configJSON []byte, eTag string) error + func (n *NativeLocalBucketing) UserQueueLength() (int, error) + func (n *NativeLocalBucketing) Variable(user User, variableKey string, variableType string) (Variable, error) + type Options struct + BucketingAPIURI string + ConfigCDNURI string + ConfigPollingIntervalMS time.Duration + DisableAutomaticEventLogging bool + DisableCustomEventLogging bool + EnableCloudBucketing bool + EnableEdgeDB bool + EventFlushIntervalMS time.Duration + EventsAPIURI string + FlushEventQueueSize int + Logger util.Logger + MaxEventQueueSize int + OnInitializedChannel chan bool + RequestTimeout time.Duration + func (o *Options) CheckDefaults() + type PlatformData = api.PlatformData + type ReadOnlyVariable = api.ReadOnlyVariable + type SDKEvent struct + Error error + FirstInitialization bool + Message string + Success bool + type User = api.User + type UserDataAndEventsBody = api.UserDataAndEventsBody + type Variable = api.Variable