config

package
v0.0.0-...-4ddd76f Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2018 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckConfig

func CheckConfig(c *Config) error

Types

type Action

type Action struct {
	Cmd  *[]string   `json:"cmd" yaml:"cmd"`
	Http *HTTPAction `json:"http" yaml:"http"`
}

type App

type App struct {
	Name        string            `json:"name" yaml:"name"`
	Seq         int               `json:"seq" yaml:"seq"`
	Env         map[string]string `json:"env" yaml:"env"`
	PreRun      *Action           `json:"preRun" yaml:"preRun"`
	PostStop    *Action           `json:"postStop" yaml:"postStop"`
	HealthCheck HealthCheck       `json:"healthCheck" yaml:"healthCheck"`
}

type Config

type Config struct {
	PreRun      *Action       `json:"preRun" yaml:"preRun"`
	PreStop     *Action       `json:"preStop" yaml:"preStop"`
	Apps        []*App        `json:"apps" yaml:"apps"`
	SignalBinds []*SignalBind `json:"signalBinds" yaml:"signalBinds"`
}

func Load

func Load(data []byte) (cfg *Config, err error)

func LoadFile

func LoadFile(name string) (*Config, error)

type HTTPAction

type HTTPAction struct {
	URL     string `json:"url" yaml:"url"`
	Method  string `json:"method" yaml:"method"`
	CAFile  string `json:"caFile" yaml:"caFile"`
	Cert    string `json:"cert" yaml:"cert"`
	CertKey string `json:"certKey" yaml:"certKey"`
}

type HealthCheck

type HealthCheck struct {
	Action   `json:",inline" yaml:",inline"`
	Interval string `json:"interval" yaml:"interval"`
	Timeout  string `json:"timeout" yaml:"timeout"`
	Retries  int    `json:"retries" yaml:"retries"`
}

type SignalBind

type SignalBind struct {
	Action `json:",inline" yaml:",inline"`
	Signal int `json:"signal" yaml:"signal"`
}

Jump to

Keyboard shortcuts

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