config

package
v0.0.0-...-236808b Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConfigContent  = errors.New("config content invalid")
	ErrDurationFormat = errors.New("duration format invalid")
	ErrTCPAddrFormat  = errors.New("tcpaddr format invalid")
)

Functions

This section is empty.

Types

type Duration

type Duration time.Duration

func (Duration) Check

func (d Duration) Check() bool

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(b []byte) error

type MysqlConfT

type MysqlConfT struct {
	Addr          string `json:"address"`
	MaxConcurrent int    `json:"maxconcurrent"`
	User          string `json:"user"`
	Pass          string `json:"password"`
	DBName        string `json:"database"`
}

func (*MysqlConfT) Check

func (c *MysqlConfT) Check() bool

type RedisConfT

type RedisConfT struct {
	Addr          string `json:"address"`
	MaxConcurrent int    `json:"maxconcurrent"`
	Pass          string `json:"password"`
}

func (*RedisConfT) Check

func (c *RedisConfT) Check() bool

type ServiceConfT

type ServiceConfT struct {
	ListenAddr TCPAddr `json:"listenaddr"`
}

func (*ServiceConfT) Check

func (c *ServiceConfT) Check() bool

type TCPAddr

type TCPAddr net.TCPAddr

func (*TCPAddr) Check

func (d *TCPAddr) Check() bool

func (*TCPAddr) MarshalJSON

func (d *TCPAddr) MarshalJSON() ([]byte, error)

func (*TCPAddr) UnmarshalJSON

func (d *TCPAddr) UnmarshalJSON(b []byte) error

type UpstreamConfT

type UpstreamConfT struct {
	Addr          string   `json:"address"`
	MaxConcurrent int      `json:"maxconcurrent"`
	Timeout       Duration `json:"timeout"`
}

func (*UpstreamConfT) Check

func (c *UpstreamConfT) Check() bool

Jump to

Keyboard shortcuts

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