Documentation
¶
Overview ¶
Package eppoclient provides client for eppo.cloud. Check InitClient to get started.
Index ¶
- Constants
- type AssignmentEvent
- type AssignmentLogger
- type Config
- type EppoClient
- func (ec *EppoClient) GetBoolAssignment(subjectKey string, flagKey string, subjectAttributes SubjectAttributes, ...) (bool, error)
- func (ec *EppoClient) GetIntegerAssignment(subjectKey string, flagKey string, subjectAttributes SubjectAttributes, ...) (int64, error)
- func (ec *EppoClient) GetJSONAssignment(subjectKey string, flagKey string, subjectAttributes SubjectAttributes, ...) (interface{}, error)
- func (ec *EppoClient) GetNumericAssignment(subjectKey string, flagKey string, subjectAttributes SubjectAttributes, ...) (float64, error)
- func (ec *EppoClient) GetStringAssignment(subjectKey string, flagKey string, subjectAttributes SubjectAttributes, ...) (string, error)
- type IAssignmentLogger
- type SDKParams
- type SubjectAttributes
Constants ¶
View Source
const REQUEST_TIMEOUT_SECONDS = time.Duration(10 * time.Second)
View Source
const UFC_ENDPOINT = "/flag-config/v1/config"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssignmentEvent ¶
type AssignmentEvent struct { Experiment string `json:"experiment"` FeatureFlag string `json:"featureFlag"` Allocation string `json:"allocation"` Variation string `json:"variation"` Subject string `json:"subject"` SubjectAttributes SubjectAttributes `json:"subjectAttributes,omitempty"` Timestamp string `json:"timestamp"` MetaData map[string]string `json:"metaData"` ExtraLogging map[string]string `json:"extraLogging,omitempty"` }
type AssignmentLogger ¶
type AssignmentLogger struct { }
func (*AssignmentLogger) LogAssignment ¶
func (al *AssignmentLogger) LogAssignment(event AssignmentEvent)
type Config ¶
type Config struct { BaseUrl string SdkKey string AssignmentLogger IAssignmentLogger PollerInterval time.Duration }
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.
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) GetBoolAssignment ¶
func (ec *EppoClient) GetBoolAssignment(subjectKey string, flagKey string, subjectAttributes SubjectAttributes, defaultValue bool) (bool, error)
func (*EppoClient) GetIntegerAssignment ¶
func (ec *EppoClient) GetIntegerAssignment(subjectKey string, flagKey string, subjectAttributes SubjectAttributes, defaultValue int64) (int64, error)
func (*EppoClient) GetJSONAssignment ¶
func (ec *EppoClient) GetJSONAssignment(subjectKey string, flagKey string, subjectAttributes SubjectAttributes, defaultValue interface{}) (interface{}, error)
func (*EppoClient) GetNumericAssignment ¶
func (ec *EppoClient) GetNumericAssignment(subjectKey string, flagKey string, subjectAttributes SubjectAttributes, defaultValue float64) (float64, error)
func (*EppoClient) GetStringAssignment ¶
func (ec *EppoClient) GetStringAssignment(subjectKey string, flagKey string, subjectAttributes SubjectAttributes, defaultValue string) (string, error)
type IAssignmentLogger ¶
type IAssignmentLogger interface {
LogAssignment(event AssignmentEvent)
}
func NewAssignmentLogger ¶
func NewAssignmentLogger() IAssignmentLogger
type SubjectAttributes ¶
type SubjectAttributes map[string]interface{}
Click to show internal directories.
Click to hide internal directories.