Documentation ¶
Index ¶
- func Error(format string, args ...interface{})
- func Fatal(format string, args ...interface{})
- func Info(format string, args ...interface{})
- type AssignBucketsRequestHandler
- type Bucket
- type BucketRequestHandler
- type Buckets
- type Config
- type ConfigBucketData
- type DumpBucketsRequestHandler
- type Experiment
- type Experiments
- type SelectedBucket
- type SelectedExperiment
- type Selector
- type Server
- type ServerConfig
- type Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AssignBucketsRequestHandler ¶
func (*AssignBucketsRequestHandler) Handle ¶
func (p *AssignBucketsRequestHandler) Handle() (map[string]interface{}, int)
type Bucket ¶
type Bucket struct { Name string `json:"name"` Percent int `json:"percent"` Data []ConfigBucketData `json:"data,omitempty"` CumulativeProbability uint32 `json:"-"` }
type BucketRequestHandler ¶
type Config ¶
type Config struct { Server ServerConfig Experiments Experiments TemporaryServer ServerConfig `json:"server"` TemporaryExperiments Experiments `json:"experiments"` LastParsed time.Time }
func (*Config) IsAPIKeyMandatory ¶
func (*Config) IsValidAPIKey ¶
type ConfigBucketData ¶
type DumpBucketsRequestHandler ¶
type DumpBucketsRequestHandler struct {
Config *Config
}
func (*DumpBucketsRequestHandler) Handle ¶
func (p *DumpBucketsRequestHandler) Handle() (map[string]interface{}, int)
type Experiment ¶
type Experiments ¶
type Experiments []Experiment
type SelectedBucket ¶
type SelectedBucket struct { Name string `json:"name"` Data []ConfigBucketData `json:"data,omitempty"` }
type SelectedExperiment ¶
type SelectedExperiment struct { Name string `json:"name"` Description string `json:"description"` Bucket SelectedBucket `json:"bucket"` }
type Selector ¶
type Selector struct {
Experiments *Experiments
}
func (*Selector) AssignBuckets ¶
func (s *Selector) AssignBuckets(userID string) []SelectedExperiment
type Server ¶
func (*Server) HandleBucketAssignment ¶
func (s *Server) HandleBucketAssignment(w http.ResponseWriter, r *http.Request)
func (*Server) HandleBucketDump ¶
func (s *Server) HandleBucketDump(w http.ResponseWriter, r *http.Request)
type ServerConfig ¶
type Session ¶
type Session struct { StartTime time.Time RemoteAddr string ResponseCode int ResponseBody []byte PrivateLoggedResponseString string APIKey string // contains filtered or unexported fields }
func (*Session) Process ¶
func (s *Session) Process(bucketHandler BucketRequestHandler, writer http.ResponseWriter, request *http.Request, config *Config)
Click to show internal directories.
Click to hide internal directories.