configuration

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2017 License: Apache-2.0 Imports: 8 Imported by: 289

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bamboo added in v0.2.0

type Bamboo struct {
	// Service host
	Endpoint string

	// Routing configuration storage
	Zookeeper Zookeeper
}

type Configuration

type Configuration struct {
	// Marathon configuration
	Marathon Marathon

	// Bamboo specific configuration
	Bamboo Bamboo

	// HAProxy output configuration
	HAProxy HAProxy

	// StatsD configuration
	StatsD StatsD
}

Service configuration struct

func FromFile

func FromFile(filePath string) (Configuration, error)

func (*Configuration) FromFile

func (config *Configuration) FromFile(filePath string) error

Returns Configuration struct from a given file path

Parameters:

filePath: full file path to the JSON configuration

type DomainMapping

type DomainMapping struct {
	Zookeeper Zookeeper
}

Services mapping information storage configuration Only support zookeeper at the moment

type HAProxy

type HAProxy struct {
	TemplatePath            string
	OutputPath              string
	ReloadCommand           string
	ReloadValidationCommand string
	ReloadCleanupCommand    string
}

type Marathon

type Marathon struct {
	// comma separated marathon http endpoints including port number
	Endpoint string
	User     string
	Password string

	UseEventStream bool
}

Mesos Marathon configuration

func (Marathon) Endpoints added in v0.2.6

func (m Marathon) Endpoints() []string

type StatsD

type StatsD struct {
	Enabled bool
	Host    string
	Prefix  string

	Client g2s.Statter
}

func (*StatsD) CreateClient

func (s *StatsD) CreateClient()

func (*StatsD) Gauge

func (s *StatsD) Gauge(sampleRate float32, bucket string, value string)

func (*StatsD) Increment

func (s *StatsD) Increment(sampleRate float32, bucket string, n int)

func (*StatsD) Timing

func (s *StatsD) Timing(sampleRate float32, bucket string, d time.Duration)

type Zookeeper

type Zookeeper struct {
	// comma separated host:port connection strings set
	Host string
	// zookeeper path
	Path string
	// Delay n seconds to report change event
	ReportingDelay int64
}

Zookeeper configuration set

func (Zookeeper) ConnectionString

func (zk Zookeeper) ConnectionString() []string

func (Zookeeper) Delay

func (zk Zookeeper) Delay() time.Duration

Jump to

Keyboard shortcuts

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