config

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package config contains all the configuration attributes for running Optimizely Agent

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	MaxConns int    `yaml:"maxconns"`
	Port     string `yaml:"port"`
}

APIConfig holds the REST API configuration

type AdminConfig

type AdminConfig struct {
	Version string `yaml:"version"`
	Author  string `yaml:"author"`
	Name    string `yaml:"name"`
	Port    string `yaml:"port"`
}

AdminConfig holds the configuration for the admin web interface

type AgentConfig

type AgentConfig struct {
	Admin   AdminConfig   `yaml:"admin"`
	API     APIConfig     `yaml:"api"`
	Log     LogConfig     `yaml:"log"`
	Optly   OptlyConfig   `yaml:"optly"`
	Server  ServerConfig  `yaml:"server"`
	Webhook WebhookConfig `yaml:"webhook"`
}

AgentConfig is the top level configuration struct

func NewDefaultConfig

func NewDefaultConfig() *AgentConfig

NewDefaultConfig returns the default configuration for Optimizely Agent

type LogConfig

type LogConfig struct {
	Pretty bool   `yaml:"pretty"`
	Level  string `yaml:"level"`
}

LogConfig holds the log configuration

type OptlyConfig

type OptlyConfig struct {
	Processor ProcessorConfig `yaml:"processor"`
	SDKKeys   []string        `yaml:"sdkkeys"`
}

OptlyConfig holds the set of SDK keys to bootstrap during initialization

type ProcessorConfig

type ProcessorConfig struct {
	BatchSize     int           `yaml:"batchSize" default:"10"`
	QueueSize     int           `yaml:"queueSize" default:"1000"`
	FlushInterval time.Duration `yaml:"flushInterval" default:"30s"`
}

ProcessorConfig holds the configuration options for the Optimizely Event Processor.

type ServerConfig

type ServerConfig struct {
	ReadTimeout  time.Duration `yaml:"readtimeout"`
	WriteTimeout time.Duration `yaml:"writetimeout"`
}

ServerConfig holds the global http server configs

type WebhookConfig

type WebhookConfig struct {
	Port     string                   `yaml:"port"`
	Projects map[int64]WebhookProject `mapstructure:"projects"`
}

WebhookConfig holds configuration for Optimizely Webhooks

type WebhookProject

type WebhookProject struct {
	SDKKeys            []string `yaml:"sdkKeys"`
	Secret             string   `yaml:"secret"`
	SkipSignatureCheck bool     `yaml:"skipSignatureCheck" default:"false"`
}

WebhookProject holds the configuration for a single Project webhook

Jump to

Keyboard shortcuts

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