configuration

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2014 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	// Marathon configuration
	Marathon Marathon

	// Services mapping configuration
	DomainMapping DomainMapping

	// 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
}

type Marathon

type Marathon struct {
	// marathon http endpoint including port number
	Endpoint string
	// Zookeeper setting for marathon
	Zookeeper Zookeeper
}

Mesos Marathon configuration

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