config

package
v0.0.0-...-998cc21 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	YamlConfig
	SyncLogMethodsSet set.Set
	Synclog           *log.Logger
	Accesslog         *log.Logger
	Mainlog           *log.Logger
}

Config contains processed YamlConfig data

func Configure

func Configure(configFilePath string) (conf Config, err error)

Configure parse configuration file

type YAMLURL

type YAMLURL struct {
	*url.URL
}

YAMLURL type fields in yaml configuration will parse urls

func (*YAMLURL) UnmarshalYAML

func (j *YAMLURL) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML parses strings to url.URL

type YamlConfig

type YamlConfig struct {
	// Listen interface and port e.g. "0:8000", "localhost:9090", ":80"
	Listen string `yaml:"Listen,omitempty"`
	// List of backend uri's e.g. "http:// s3.mydaracenter.org"
	Backends []YAMLURL `yaml:"Backends,omitempty,flow"`
	// Limit of outgoing connections. When limit is reached, akubra will omit external backend
	// with greatest number of stalled connections
	ConnLimit int64 `yaml:"ConnLimit,omitempty"`
	// Additional not amazon specific headers proxy will add to original request
	AdditionalRequestHeaders map[string]string `yaml:"AdditionalRequestHeaders,omitempty"`
	// Additional headers added to backend response
	AdditionalResponseHeaders map[string]string `yaml:"AdditionalResponseHeaders,omitempty"`
	// Read timeout on outgoing connections
	ConnectionTimeout string `yaml:"ConnectionTimeout,omitempty"`
	// Dial timeout on outgoing connections
	ConnectionDialTimeout string `yaml:"ConnectionDialTimeout,omitempty"`
	// Backend in maintenance mode. Akubra will not send data there
	MaintainedBackend string `yaml:"MaintainedBackend,omitempty"`
	// List request methods to be logged in synclog in case of backend failure
	SyncLogMethods []string `yaml:"SyncLogMethods,omitempty"`
	// Should we keep alive connections with backend servers
	KeepAlive bool `yaml:"KeepAlive"`
}

YamlConfig contains configuration fields of config file

Jump to

Keyboard shortcuts

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