Versions in this module Expand all Collapse all v3 v3.1.2 Dec 7, 2020 Changes in this version + func Close() error + func Initialize(options ...ConfigOption) (err error) + func IsEnabled(feature string, options ...FeatureOption) bool + func WaitForReady() + type Client struct + func NewClient(options ...ConfigOption) (*Client, error) + func (uc *Client) Close() error + func (uc *Client) Count() <-chan metric + func (uc *Client) Errors() <-chan error + func (uc *Client) IsEnabled(feature string, options ...FeatureOption) (enabled bool) + func (uc *Client) ListFeatures() []api.Feature + func (uc *Client) Ready() <-chan bool + func (uc *Client) Registered() <-chan ClientData + func (uc *Client) Sent() <-chan MetricsData + func (uc *Client) WaitForReady() + func (uc *Client) Warnings() <-chan error + type ClientData struct + AppName string + InstanceID string + Interval int64 + SDKVersion string + Started time.Time + Strategies []string + type ConfigOption func(*configOption) + func WithAppName(appName string) ConfigOption + func WithBackupPath(backupPath string) ConfigOption + func WithCustomHeaders(headers http.Header) ConfigOption + func WithDisableMetrics(disableMetrics bool) ConfigOption + func WithEnvironment(env string) ConfigOption + func WithHttpClient(client *http.Client) ConfigOption + func WithInstanceId(instanceId string) ConfigOption + func WithListener(listener interface{}) ConfigOption + func WithMetricsInterval(metricsInterval time.Duration) ConfigOption + func WithRefreshInterval(refreshInterval time.Duration) ConfigOption + func WithStorage(storage Storage) ConfigOption + func WithStrategies(strategies ...strategy.Strategy) ConfigOption + func WithUrl(url string) ConfigOption + type DebugListener struct + func (l DebugListener) OnCount(name string, enabled bool) + func (l DebugListener) OnError(err error) + func (l DebugListener) OnReady() + func (l DebugListener) OnRegistered(payload ClientData) + func (l DebugListener) OnSent(payload MetricsData) + func (l DebugListener) OnWarning(warning error) + type ErrorListener interface + OnError func(error) + OnWarning func(error) + type FallbackFunc func(feature string, ctx *context.Context) bool + type FeatureOption func(*featureOption) + func WithContext(ctx context.Context) FeatureOption + func WithFallback(fallback bool) FeatureOption + func WithFallbackFunc(fallback FallbackFunc) FeatureOption + type MetricListener interface + OnCount func(string, bool) + OnRegistered func(ClientData) + OnSent func(MetricsData) + type MetricsData struct + AppName string + Bucket api.Bucket + InstanceID string + type RepositoryListener interface + OnReady func() + type Storage interface + Get func(string) (interface{}, bool) + Init func(backupPath string, appName string) + List func() []interface{} + Load func() error + Persist func() error + Reset func(data map[string]interface{}, persist bool) error