Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Version is the version for this build, set at build time via LDFLAGS Version string // GitHash is the short-form commit hash of this build, set at build time GitHash string )
Functions ¶
func ApplyTemplate ¶
ApplyTemplate creates and renders a template from the given config template
Types ¶
type Config ¶
type Config struct { Consul string `json:"consul,omitempty"` Etcd json.RawMessage `json:"etcd,omitempty"` LogConfig *LogConfig `json:"logging,omitempty"` OnStart json.RawMessage `json:"onStart,omitempty"` PreStart json.RawMessage `json:"preStart,omitempty"` PreStop json.RawMessage `json:"preStop,omitempty"` PostStop json.RawMessage `json:"postStop,omitempty"` StopTimeout int `json:"stopTimeout"` ServicesConfig json.RawMessage `json:"services,omitempty"` BackendsConfig json.RawMessage `json:"backends,omitempty"` TasksConfig json.RawMessage `json:"tasks,omitempty"` TelemetryConfig json.RawMessage `json:"telemetry,omitempty"` Services []*services.Service Backends []*backends.Backend Tasks []*tasks.Task Telemetry *telemetry.Telemetry PreStartCmd *exec.Cmd PreStopCmd *exec.Cmd PostStopCmd *exec.Cmd Command *exec.Cmd QuitChannels []chan bool ConfigFlag string }
Config is the top-level ContainerPilot Configuration
func LoadConfig ¶
func ReloadConfig ¶
type ConfigTemplate ¶
type ConfigTemplate struct { Template *template.Template Env Environment }
ConfigTemplate encapsulates a golang template and its associated environment variables.
func NewConfigTemplate ¶
func NewConfigTemplate(config []byte) (*ConfigTemplate, error)
NewConfigTemplate creates a ConfigTemplate parsed from the configuration and the current environment variables
func (*ConfigTemplate) Execute ¶
func (c *ConfigTemplate) Execute() ([]byte, error)
Execute renders the template
type DefaultLogFormatter ¶
type DefaultLogFormatter struct { }
DefaultLogFormatter delegates formatting to standard go log package
type Environment ¶
Environment is a map of environment variables to their values
Click to show internal directories.
Click to hide internal directories.