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: 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 {
	zrpc.RpcServerConf
	LogicRPC  zrpc.RpcClientConf
	TCP       TCP `json:"TCP"`
	Websocket Websocket
	Protocol  Protocol
	Bucket    comet.BucketConfig
	Zlog      xlog.Config
}

type Protocol

type Protocol struct {
	Timer            int           `json:",default=32"`
	TimerSize        int           `json:",default=2048"`
	Task             int           `json:",default=32"`
	TaskSize         int           `json:",default=2048"`
	SvrProto         int           `json:",default=5"`
	CliProto         int           `json:",default=10"`
	HandshakeTimeout time.Duration `json:",default=5s"`
	MinHeartbeat     time.Duration `json:",default=5s"`
	MaxHeartbeat     time.Duration `json:",default=10m"`
	TaskDuration     time.Duration `json:",default=30m"`
	Rto              time.Duration `json:",default=3s"`
}

Protocol is protocol config.

type TCP

type TCP struct {
	Bind         []string `json:",default=[':3101']"`
	Sndbuf       int      `json:",default=4096"`
	Rcvbuf       int      `json:",default=4096"`
	KeepAlive    bool     `json:",default=false"`
	Reader       int      `json:",default=32"`
	ReadBuf      int      `json:",default=1024"`
	ReadBufSize  int      `json:",default=8192"`
	Writer       int      `json:",default=32"`
	WriteBuf     int      `json:",default=1024"`
	WriteBufSize int      `json:",default=8192"`
}

TCP is tcp config.

type Websocket

type Websocket struct {
	Bind        []string `json:",default=['3102']"`
	TLSOpen     bool     `json:",optional"`
	TLSBind     []string `json:",optional"`
	CertFile    string   `json:",optional"`
	PrivateFile string   `json:",optional"`
}

Websocket is websocket config.

Jump to

Keyboard shortcuts

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