conf

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Conf config
	Conf = &Config{}
)

Functions

This section is empty.

Types

type Broadcast

type Broadcast struct {
	Debug         bool
	MaxProc       int
	ServerTick    xtime.Duration
	OnlineTick    xtime.Duration
	Failover      bool
	APIHost       string
	APIToken      string
	OnlineRetries int
	OpenPortV1    bool
}

Broadcast config.

type Bucket

type Bucket struct {
	Size          int
	Channel       int
	Room          int
	RoutineAmount uint64
	RoutineSize   int
}

Bucket .

type Config

type Config struct {
	Broadcast *Broadcast
	Log       *log.Config
	HTTP      *bm.ServerConfig
	Tracer    *trace.Config
	Ecode     *ecode.Config

	WardenServer *warden.ServerConfig
	WardenClient *warden.ClientConfig
	Discovery    *discovery.Config
	HTTPClient   *bm.ClientConfig

	TCP          *TCP
	WebSocket    *WebSocket
	Timer        *Timer
	ProtoSection *ProtoSection
	Whitelist    *Whitelist
	Bucket       *Bucket
}

Config .

func (*Config) Fix

func (c *Config) Fix()

Fix fix config to default.

func (*Config) Set

func (c *Config) Set(text string) error

Set set config and decode.

type ProtoSection

type ProtoSection struct {
	HandshakeTimeout xtime.Duration
	WriteTimeout     xtime.Duration
	SvrProto         int
	CliProto         int
}

ProtoSection config

type TCP

type TCP struct {
	Bind         []string
	BindV1       []string
	Sndbuf       int
	Rcvbuf       int
	Keepalive    bool
	Reader       int
	ReadBuf      int
	ReadBufSize  int
	Writer       int
	WriteBuf     int
	WriteBufSize int
}

TCP config

type Timer

type Timer struct {
	Timer     int
	TimerSize int
}

Timer config

type WebSocket

type WebSocket struct {
	Bind        []string
	BindV1      []string
	TLSOpen     bool
	TLSBind     []string
	TLSBindV1   []string
	CertFile    string
	PrivateFile string
}

WebSocket config

type Whitelist

type Whitelist struct {
	Whitelist []int64
	WhiteLog  string
}

Whitelist .

Jump to

Keyboard shortcuts

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