config

package
v0.0.0-...-3f388d4 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MonitorConfPath = "conf/monitor.yaml"
)

Variables

This section is empty.

Functions

func GetClusterManagerCIDR

func GetClusterManagerCIDR() (*net.IPNet, error)

func GetDatabaseCIDR

func GetDatabaseCIDR() (*net.IPNet, error)

func GetMaxscaleCIDR

func GetMaxscaleCIDR() (*net.IPNet, error)

Types

type MonitorConf

type MonitorConf struct {
	Collector struct {
		Database struct {
			Socketpath string `yaml:"socketpath"`
			Username   string `yaml:"username"`
			Database   string `yaml:"database"`
			ListenCIDR string `yaml:"cidr"`
			ListenAddr *net.IPNet
		} `yaml:"database"`
		Maxscale struct {
			Path       string `yaml:"path"`
			ListenCIDR string `yaml:"cidr"`
			ListenAddr *net.IPNet
		}
		ClusterManager struct {
			LogPath    string `yaml:"logpath"`
			ListenCIDR string `yaml:"cidr"`
			ListenAddr *net.IPNet
		} `yaml:"clustermanager"`
	} `yaml:"collector"`
	Service struct {
		Netdev string `yaml:"netdev"`
		Port   int    `yaml:"port"`
	} `yaml:"service"`
}
var (
	MonitorConfInfo *MonitorConf
)

func GetMonitorConf

func GetMonitorConf() (*MonitorConf, error)

Jump to

Keyboard shortcuts

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