config

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2014 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = &Config{
	Apibase:  "https://mackerel.io",
	Root:     "/var/lib/mackerel-agent",
	Pidfile:  "/var/run/mackerel-agent.pid",
	Conffile: "/etc/mackerel-agent/mackerel-agent.conf",
	Roles:    []string{},
	Verbose:  false,
	Connection: ConnectionConfig{
		Post_Metrics_Dequeue_Delay_Seconds: 30,
		Post_Metrics_Retry_Delay_Seconds:   60,
		Post_Metrics_Retry_Max:             10,
		Post_Metrics_Buffer_Size:           30,
	},
}

Functions

This section is empty.

Types

type Config

type Config struct {
	Apibase         string
	Apikey          string
	Root            string
	Pidfile         string
	Conffile        string
	Roles           []string
	Verbose         bool
	Connection      ConnectionConfig
	Plugin          map[string]PluginConfigs
	DeprecatedSensu map[string]PluginConfigs `toml:"sensu"` // DEPRECATED this is for backward compatibility
}

func LoadConfig

func LoadConfig(conffile string) (Config, error)

func LoadConfigFile

func LoadConfigFile(file string) (Config, error)

type ConnectionConfig added in v0.9.0

type ConnectionConfig struct {
	Post_Metrics_Dequeue_Delay_Seconds int // delay for dequeuing from buffer queue
	Post_Metrics_Retry_Delay_Seconds   int // delay for retring a request that causes errors
	Post_Metrics_Retry_Max             int // max numbers of retries for a request that causes errors
	Post_Metrics_Buffer_Size           int // max numbers of requests stored in buffer queue.
}

type PluginConfig

type PluginConfig struct {
	Command string
}

type PluginConfigs

type PluginConfigs map[string]PluginConfig

Jump to

Keyboard shortcuts

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