config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: MIT Imports: 4 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 {
	ListenSchema           string       `yaml:"listen_schema"`
	ListenAddr             string       `yaml:"listen_addr"`
	ListenPort             int          `yaml:"listen_port"`
	SSLCertificate         string       `yaml:"ssl_certificate"`
	SSLCertificateKey      string       `yaml:"ssl_certificate_key"`
	TCPHealthCheck         bool         `yaml:"tcp_health_check"`
	TCPHealthCheckInterval uint         `yaml:"tcp_health_check_interval"`
	MaxAllowed             uint         `yaml:"max_allowed"`
	Locations              []*Locations `yaml:"locations"`
}

func NewReadConfig

func NewReadConfig(file string) (*Config, error)

NewReadConfig 用于读取配置文件

func (*Config) Print

func (c *Config) Print()

Print 用于打印配置信息

func (*Config) Validation

func (c *Config) Validation() error

Validation 用于验证配置信息

type Locations

type Locations struct {
	Prefix      string   `yaml:"prefix"`
	BalanceMode string   `yaml:"balance_mode"`
	Servers     []string `yaml:"servers"`
}

Jump to

Keyboard shortcuts

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