config

package
v0.0.0-...-b7cb1fb Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Mask  int    `mapstructure:"netmask"`
	Iface string `mapstructure:"interface"`
	Label string `mapstructure:"label"`

	HostingType string `mapstructure:"manager-type"`

	Nodename string `mapstructure:"nodename"` //hostname to trigger on. usually the name of the host where this vip-manager runs.

	DcsType      string   `mapstructure:"dcs-type"`
	DcsEndpoints []string `mapstructure:"dcs-endpoints"`

	DcsNamespace string `mapstructure:"dcs-namespace"`

	DcsClusterName string `mapstructure:"dcs-clustername"`

	CheckerType string `mapstructure:"checker-type"`

	HttpUrl                      string `mapstructure:"http-url"`
	HttpUser                     string `mapstructure:"http-user"`
	HttpPassword                 string `mapstructure:"http-password"`
	HttpCAFile                   string `mapstructure:"http-ca-file"`
	HttpCertFile                 string `mapstructure:"http-cert-file"`
	HttpKeyFile                  string `mapstructure:"http-key-file"`
	HttpExpectedCode             int    `mapstructure:"http-expected-code"`
	HttpExpectedResponse         string `mapstructure:"http-expected-response"`
	HttpExpectedResponseContains string `mapstructure:"http-expected-response-contains"`

	PostgresConnUrl          string `mapstructure:"postgres-conn-url"`
	PostgresQuery            string `mapstructure:"postgres-query"`
	PostgresUser             string `mapstructure:"postgres-user"`
	PostgresPassword         string `mapstructure:"postgres-password"`
	PostgresCAFile           string `mapstructure:"postgres-ca-file"`
	PostgresCertFile         string `mapstructure:"postgres-cert-file"`
	PostgresKeyFile          string `mapstructure:"postgres-key-file"`
	PostgresExpectedResponse string `mapstructure:"postgres-exprected-response"`

	EtcdUser     string `mapstructure:"etcd-user"`
	EtcdPassword string `mapstructure:"etcd-password"`
	EtcdCAFile   string `mapstructure:"etcd-ca-file"`
	EtcdCertFile string `mapstructure:"etcd-cert-file"`
	EtcdKeyFile  string `mapstructure:"etcd-key-file"`

	ConsulToken string `mapstructure:"consul-token"`

	TTL int `mapstructure:"ttl"`

	Interval int `mapstructure:"interval"` //milliseconds

	RetryAfter int `mapstructure:"retry-after"` //milliseconds
	RetryNum   int `mapstructure:"retry-num"`

	LogLevel string `mapstructure:"log-level"` // Trace, Debug, Info, Warning, Error, Fatal and Panic
}

Config represents the configuration of the VIP manager

func NewConfig

func NewConfig() (*Config, error)

NewConfig returns a new Config instance

Jump to

Keyboard shortcuts

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