Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collectors ¶
type Collectors struct { Name string `toml:"name"` SyncInterval uint64 `toml:"sync-interval"` Disabled bool `toml:"disabled"` }
Collectors struct defines the structure of collectors configuration
type Config ¶
type Config struct { *Globals `toml:"globals"` CollectorsConf map[string]Collectors `toml:"collectors"` }
Config struct defines overall configurations it embeds 'Globals' configuration
func LoadConfig ¶
LoadConfig loads the configuration file
type GConfig ¶
type GConfig struct { GlusterMgmt string `toml:"gluster-mgmt"` Glusterd2Endpoint string `toml:"gd2-rest-endpoint"` GlusterCmd string `toml:"gluster-binary-path"` GlusterRemoteHost string `toml:"gd1-remote-host"` GlusterGlusterdSock string `toml:"gd1-glusterd-sock"` GlusterdWorkdir string `toml:"glusterd-dir"` GlusterClusterID string `toml:"gluster-cluster-id"` Glusterd2User string Glusterd2Secret string Glusterd2Cacert string Glusterd2Insecure bool Timeout int64 }
GConfig represents Glusterd1/Glusterd2 configurations
func GConfigFromInterface ¶
GConfigFromInterface method returns a 'GConfig' pointer, if and only if the argument interface implements 'GConfigInterface'
type GConfigInterface ¶
type GConfigInterface interface {
GConfig() *GConfig
}
GConfigInterface enables to get configuration, with which the gluster management objects are created. Should be implemented by both GD1 and GD2.
type Globals ¶
type Globals struct { Port int `toml:"port"` MetricsPath string `toml:"metrics-path"` LogDir string `toml:"log-dir"` LogFile string `toml:"log-file"` LogLevel string `toml:"log-level"` CacheTTL uint64 `toml:"cache-ttl-in-sec"` CacheEnabledFuncs []string `toml:"cache-enabled-funcs"` *GConfig }
Globals maintains the global system configurations
Click to show internal directories.
Click to hide internal directories.