Versions in this module Expand all Collapse all v2 v2.2.1 Oct 24, 2025 v2.2.0 Sep 30, 2025 Changes in this version + const CmabFetchFailed + const DefaultBackoffMultiplier + const DefaultCacheSize + const DefaultCacheTTL + const DefaultHTTPTimeout + const DefaultInitialBackoff + const DefaultMaxBackoff + const DefaultMaxRetries + const NumLockStripes + var CMABPredictionEndpoint = "https://prediction.cmab.optimizely.com/predict/%s" + func FetchFailedError(experimentKey string) error + type Attribute struct + ID string + Type string + Value interface{} + type CacheValue struct + AttributesHash string + CmabUUID string + VariationID string + type Client interface + FetchDecision func(ruleID string, userID string, attributes map[string]interface{}, ...) (string, error) + type ClientOptions struct + HTTPClient *http.Client + Logger logging.OptimizelyLogProducer + RetryConfig *RetryConfig + type Config struct + Cache cache.CacheWithRemove + CacheSize int + CacheTTL time.Duration + HTTPTimeout time.Duration + RetryConfig *RetryConfig + func NewDefaultConfig() Config + type Decision struct + CmabUUID string + Reasons []string + VariationID string + type DefaultCmabClient struct + func NewDefaultCmabClient(options ClientOptions) *DefaultCmabClient + func (c *DefaultCmabClient) FetchDecision(ruleID string, userID string, attributes map[string]interface{}, ...) (string, error) + type DefaultCmabService struct + func NewDefaultCmabService(options ServiceOptions) *DefaultCmabService + func (s *DefaultCmabService) GetDecision(projectConfig config.ProjectConfig, userContext entities.UserContext, ...) (Decision, error) + type Instance struct + Attributes []Attribute + CmabUUID string + ExperimentID string + VisitorID string + type Prediction struct + VariationID string + type Request struct + Instances []Instance + type Response struct + Predictions []Prediction + type RetryConfig struct + BackoffMultiplier float64 + InitialBackoff time.Duration + MaxBackoff time.Duration + MaxRetries int + type Service interface + GetDecision func(projectConfig config.ProjectConfig, userContext entities.UserContext, ...) (Decision, error) + type ServiceOptions struct + CmabCache cache.CacheWithRemove + CmabClient Client + Logger logging.OptimizelyLogProducer