config

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	API_PREFIX = "/v_beta"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DNS

type DNS struct {
	Domain    string `json:"domain"`
	RecurseOn bool   `json:"recurse_on"`
	IP        string `json:"ip"`
	Port      int    `json:"port"`

	SOARname   string `json:"soarname"`
	SOAMname   string `json:"soamname"`
	SOASerial  uint32 `json:"soaserial"`
	SOARefresh uint32 `json:"soarefresh"`
	SOARetry   uint32 `json:"soaretry"`
	SOAExpire  uint32 `json:"soaexpire"`

	TTL int `json:"ttl"`

	Resolvers       []string      `json:"resolvers"`
	ExchangeTimeout time.Duration `json:"exchange_timeout"`
}

type Janitor

type Janitor struct {
	IP          string `json:"ip"`
	Port        int    `json:"port"`
	Domain      string `json:"domain"`
	AdvertiseIP string `json:"advertiseIp"`
}

type Scheduler

type Scheduler struct {
	ZkPath             string `json:"zkpath"`
	MesosFrameworkUser string `json:"mesos-framwork-user"`
	Hostname           string `json:"hostname"`
}

type SwanConfig

type SwanConfig struct {
	NodeID            string   `json:"nodeID"`
	LogLevel          string   `json:"logLevel"`
	Mode              SwanMode `json:"mode"` // manager, agent, mixed
	DataDir           string   `json:"dataDir"`
	NoRecover         bool     `json:"noRecover"`
	Domain            string   `json:"domain"`
	RaftAdvertiseAddr string   `json:"raftAdvertiseAddr"`
	RaftListenAddr    string   `json:"raftListenAddr"`
	ListenAddr        string   `json:"listenAddr"`
	AdvertiseAddr     string   `json:"advertiseAddr"`
	JoinAddrs         []string `json:"joinAddrs"`

	Scheduler Scheduler `json:"scheduler"`

	DNS     DNS     `json:"dns"`
	Janitor Janitor `json:"janitor"`
}

func NewConfig

func NewConfig(c *cli.Context) (SwanConfig, error)

type SwanMode

type SwanMode string
const (
	Manager SwanMode = "manager"
	Agent   SwanMode = "agent"
	Mixed   SwanMode = "mixed"
)

Jump to

Keyboard shortcuts

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