Documentation
¶
Index ¶
Constants ¶
View Source
const ( RUN_MODE_LOCAL = "local" RUN_MODE_CONTAINER = "container" RUN_MODE_K8S = "k8s" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ServiceName string `yaml:"service_name"` RunMode string // dev test prod MaxProc int ServerTick xtime.Duration OnlineTick xtime.Duration LogPath string Env *Env Discovery *DiscoveryConf TCP *TCP `yaml:"tcp_server"` WebSocket *WebSocket `yaml:"websocket_server"` Timer *Timer ProtoSection *ProtoSection Bucket *Bucket RPCClient *RPCClient `yaml:"rpc_lient"` RPCServer *RPCServer `yaml:"rpc_server"` Zipkin *zipkinConf MetricsServer struct { Addr string } `yaml:"metrics_server"` }
Config is comet config.
type DiscoveryConf ¶
type DiscoveryConf struct {
Addr string
}
type ProtoSection ¶
type ProtoSection struct { HandshakeTimeout xtime.Duration WriteTimeout xtime.Duration SvrProto int CliProto int }
ProtoSection is proto section.
type RPCServer ¶
type RPCServer struct { Network string Addr string Timeout xtime.Duration IdleTimeout xtime.Duration MaxLifeTime xtime.Duration ForceCloseWait xtime.Duration KeepAliveInterval xtime.Duration KeepAliveTimeout xtime.Duration }
RPCServer is RPC server config.
type TCP ¶
type TCP struct { Bind []string Sndbuf int Rcvbuf int Keepalive bool Reader int ReadBuf int ReadBufSize int Writer int WriteBuf int WriteBufSize int }
TCP is tcp config.
Click to show internal directories.
Click to hide internal directories.