sdk

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 18 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 UserAttrs) (EvalData, error)
	EvalAll(user UserAttrs) map[string]EvalData
	Keys() []string
	GetCachedJson() *store.EntryWithEtag
	SubConfigChanged(id string) <-chan struct{}
	UnsubConfigChanged(id string)
	Ready() <-chan struct{}
	Refresh() error
	Close()
	WebhookSigningKey() string
	WebhookSignatureValidFor() int
}

func NewClient

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

type Context

type Context struct {
	SdkId              string
	SDKConf            *config.SDKConfig
	ProxyConf          *config.HttpProxyConfig
	CacheConf          *config.CacheConfig
	GlobalDefaultAttrs UserAttrs
	MetricsHandler     metrics.Handler
	StatusReporter     status.Reporter
	EvalReporter       statistics.Reporter
}

type EvalData

type EvalData struct {
	Value       interface{}
	VariationId string
	User        configcat.User
}

type UserAttrs

type UserAttrs map[string]string

func MergeUserAttrs added in v0.1.3

func MergeUserAttrs(first UserAttrs, second UserAttrs) UserAttrs

func (UserAttrs) Discriminator

func (attrs UserAttrs) Discriminator(s maphash.Seed) uint64

func (UserAttrs) GetAttribute

func (attrs UserAttrs) GetAttribute(attr string) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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