16 lines
495 B
Go
16 lines
495 B
Go
|
|
package config
|
||
|
|
|
||
|
|
// WSConfig WebSocket 配置
|
||
|
|
type WSConfig struct {
|
||
|
|
Mode string `mapstructure:"mode"` // standalone | cluster
|
||
|
|
Cluster WSClusterConfig `mapstructure:"cluster"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// WSClusterConfig WebSocket 集群配置
|
||
|
|
type WSClusterConfig struct {
|
||
|
|
InstanceID string `mapstructure:"instance_id"`
|
||
|
|
MsgChannel string `mapstructure:"msg_channel"`
|
||
|
|
OnlineTTL int `mapstructure:"online_ttl"`
|
||
|
|
HeartbeatInterval int `mapstructure:"heartbeat_interval"`
|
||
|
|
}
|