config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: MIT Imports: 7 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 {
	ListenIP    string            `yaml:"listen_ip" json:"listen_ip"`
	ListenPort  int               `yaml:"listen_port" json:"listen_port"`
	MetricsPath string            `yaml:"metrics_path" json:"metrics_path"`
	EruSize     string            `yaml:"eru_size" json:"eru_size"`
	Clusters    map[string]string `yaml:"clusters" json:"clusters"`
}

Config is the top level configuration used by the service discovery module

var GlobalConfig *Config

func NewConfig

func NewConfig(configPath string) (*Config, error)

NewConfig constructs a new Config instance

func (*Config) Serialize

func (c *Config) Serialize() (string, error)

Serialize serializes the configuration so that it can be printed and viewed

func (*Config) Validate

func (c *Config) Validate() error

Validate runs a validation on the configuration file

Jump to

Keyboard shortcuts

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