config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2017 License: Apache-2.0 Imports: 7 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 {
	ListenerMode string `json:"listenerMode"`
	IP           string `json:"ip"`
	Port         int    `json:"port"`
	Domain       string `json:"domain"`
	AdvertiseIP  string `json:"advertiseIp"`
}

type Raft

type Raft struct {
	Cluster   string `json:"cluster"`
	RaftId    int    `json:"raftid"`
	StorePath string `json:"store_path"`
}

type Scheduler

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

type SwanConfig

type SwanConfig struct {
	LogLevel         string   `json:"log-level"`
	Mode             SwanMode `json:"mode"` // manager, agent, mixed
	DataDir          string   `json:"data-dir"`
	NoRecover        bool     `json:"no-recover"`
	Domain           string   `json:"domain"`
	SwanClusterAddrs []string `json:swan-cluster-addrs`

	Scheduler Scheduler `json:"scheduler"`
	Raft      Raft      `json:"raft"`

	DNS           DNS     `json:"dns"`
	Janitor       Janitor `json:"janitor"`
	ListenAddr    string  `json:"listen-addr"`
	AdvertiseAddr string  `json:"advertise-addr"`
}

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