eppoclient

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package eppoclient provides client for eppo.cloud. Check InitClient to get started.

Index

Constants

View Source
const MAX_CACHE_ENTRIES = 1000 // arbitrary; the caching library requires a max limit
View Source
const RAC_ENDPOINT = "/randomized_assignment/config"
View Source
const REQUEST_TIMEOUT_SECONDS = time.Duration(1 * time.Second)

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignmentLogger

type AssignmentLogger struct {
}

func (*AssignmentLogger) LogAssignment

func (al *AssignmentLogger) LogAssignment(event map[string]string)

type Config

type Config struct {
	BaseUrl          string `default:"https://eppo.cloud/api"`
	ApiKey           string
	AssignmentLogger AssignmentLogger
}

type EppoClient

type EppoClient struct {
	// contains filtered or unexported fields
}

Client for eppo.cloud. Instance of this struct will be created on calling InitClient. EppoClient will then immediately start polling experiments data from eppo.cloud.

func InitClient

func InitClient(config Config) *EppoClient

InitClient is required to start polling of experiments configurations and create an instance of EppoClient, which could be used to get assignments information.

func (*EppoClient) GetAssignment

func (ec *EppoClient) GetAssignment(subjectKey string, experimentKey string, subjectAttributes dictionary) (string, error)

type IAssignmentLogger

type IAssignmentLogger interface {
	LogAssignment(event map[string]string)
}

func NewAssignmentLogger

func NewAssignmentLogger() IAssignmentLogger

type SDKParams

type SDKParams struct {
	// contains filtered or unexported fields
}

type Variation

type Variation struct {
	Name       string `json:"name"`
	ShardRange shardRange
}

Jump to

Keyboard shortcuts

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