Documentation
¶
Overview ¶
Package config handles Mush configuration using Viper.
Configuration sources (in priority order):
- Environment variables (MUSH_*)
- Config file (~/.config/mush/config.yaml)
- Built-in defaults
Index ¶
- Constants
- type Config
- func (c *Config) APIURL() string
- func (c *Config) All() map[string]interface{}
- func (c *Config) Get(key string) interface{}
- func (c *Config) GetInt(key string) int
- func (c *Config) GetString(key string) string
- func (c *Config) HeartbeatInterval() int
- func (c *Config) PollInterval() int
- func (c *Config) Set(key string, value interface{}) error
Constants ¶
const ( // DefaultAPIURL is the default Musher API endpoint. DefaultAPIURL = "http://localhost:17200" // DefaultPollInterval is the default poll interval in seconds. DefaultPollInterval = 30 // DefaultHeartbeatInterval is the default heartbeat interval in seconds. DefaultHeartbeatInterval = 30 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config holds the Mush configuration.
func (*Config) HeartbeatInterval ¶
HeartbeatInterval returns the heartbeat interval in seconds.
func (*Config) PollInterval ¶
PollInterval returns the poll interval in seconds.