conf

package
v0.0.0-...-e7f8777 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: Apache-2.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 {
	ServiceID       string
	ServiceName     string `default:"wgateway"`
	Listen          string `default:":8000"`
	PublicAddress   string
	PublicPort      uint16 `default:"8000"`
	Tags            []string
	Domain          string
	EtcdEndpoints   string
	MonitorPort     uint16 `default:"8001"`
	AppSecret       string
	LogLevel        string `default:"debug"`
	MessageGPool    int    `default:"10000"`
	ConnectionGPool int    `default:"15000"`
}

func Init

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

func (Config) String

func (c Config) String() string

type Route

type Route struct {
	RouteBy   string
	Zones     []Zone
	Whitelist map[string]string
	Slots     []int
}

func ReadRoute

func ReadRoute(path string) (*Route, error)

type Zone

type Zone struct {
	ID     string
	Weight int
}

Jump to

Keyboard shortcuts

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