sdk

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OverrideUserAgent added in v0.1.1

func OverrideUserAgent(transport http.RoundTripper) http.RoundTripper

Types

type Client

type Client interface {
	Eval(key string, user model.UserAttrs) model.EvalData
	EvalAll(user model.UserAttrs) map[string]model.EvalData
	Keys() []string
	GetCachedJson() *store.EntryWithEtag
	SubConfigChanged(id string) <-chan struct{}
	UnsubConfigChanged(id string)
	Ready() <-chan struct{}
	Refresh() error
	Close()
	WebhookSigningKey() string
	WebhookSignatureValidFor() int
	IsInValidState() bool
}

func NewClient

func NewClient(sdkCtx *Context, log log.Logger) Client

type Context

type Context struct {
	SdkId              string
	SDKConf            *config.SDKConfig
	ProxyConf          *config.HttpProxyConfig
	GlobalDefaultAttrs model.UserAttrs
	MetricsReporter    metrics.Reporter
	StatusReporter     status.Reporter
	EvalReporter       statistics.Reporter
	ExternalCache      configcat.ConfigCache
}

type Registrar added in v0.5.0

type Registrar interface {
	GetSdkOrNil(sdkId string) Client
	GetAll() map[string]Client
	Close()
}

func NewRegistrar added in v0.5.0

func NewRegistrar(conf *config.Config, metricsReporter metrics.Reporter, statusReporter status.Reporter, externalCache configcat.ConfigCache, log log.Logger) Registrar

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL