Documentation
¶
Index ¶
- type Gate
- func (g *Gate) Bind(s rpc.Server, msg *rpcmsg.RPCMessage)
- func (p *Gate) Close()
- func (g *Gate) Push(_ rpc.Server, msg *rpcmsg.RPCMessage)
- func (g *Gate) PushAll(_ rpc.Server, msg *rpcmsg.RPCMessage)
- func (g *Gate) PushGroup(_ rpc.Server, msg *rpcmsg.RPCMessage)
- func (g *Gate) RegisterServerMsgHandler(msgID string, handle func(rpc.Server, *rpcmsg.RPCMessage))
- func (p *Gate) Run(watch ...string) error
- func (r *Gate) WatchService(serverNames []string) error
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gate ¶
type Gate struct {
// contains filtered or unexported fields
}
func (*Gate) RegisterServerMsgHandler ¶
func (*Gate) WatchService ¶
type Options ¶
type Options struct { NatsAddr string // nats://127.0.0.1:4222,nats://127.0.0.1:4223 User string // 用户名 Pwd string // 密码 ListenAddr string // 监听地址 MaxMsgLen int // 最大消息长度(字节),默认1kb MaxConnNum int // 最大连接数 CertFile string // 证书文件 KeyFile string // 秘钥文件 ConsulAddr string Gate discovery.ServiceInstance Agent discovery.ServiceInstance }
Click to show internal directories.
Click to hide internal directories.