Documentation ¶
Index ¶
- Variables
- type Gate
- type Option
- func WithCatServer(catServer *cat.Server) Option
- func WithContext(ctx context.Context) Option
- func WithID(id string) Option
- func WithLocator(locator locate.Locator) Option
- func WithName(name string) Option
- func WithPromServer(promServer *prometheus.PromServer) Option
- func WithReceiveHook(receiveHook ...hook.ReceiveHook) Option
- func WithRegistry(r registry.Registry) Option
- func WithServer(server network.Server) Option
- func WithTimeout(timeout time.Duration) Option
- func WithTransporter(transporter transport.Transporter) Option
- func WithWsServer(server network.Server) Option
- type Proxy
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidGID = link.ErrInvalidGID ErrInvalidNID = link.ErrInvalidNID ErrInvalidMessage = link.ErrInvalidMessage ErrInvalidArgument = link.ErrInvalidArgument ErrInvalidSessionKind = link.ErrInvalidSessionKind ErrNotFoundUserSource = link.ErrNotFoundUserSource ErrReceiveTargetEmpty = link.ErrReceiveTargetEmpty )
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(o *options)
func WithCatServer ¶ added in v0.0.23
WithCatServer 设置cat server
func WithPromServer ¶ added in v0.0.23
func WithPromServer(promServer *prometheus.PromServer) Option
WithPromServer 设置prom server
func WithReceiveHook ¶ added in v0.0.15
func WithReceiveHook(receiveHook ...hook.ReceiveHook) Option
WithReceiveHook 设置Gate收到消息时的Hook函数
func WithTransporter ¶
func WithTransporter(transporter transport.Transporter) Option
WithTransporter 设置消息传输器
func WithWsServer ¶ added in v0.0.36
WithWsServer 设置websocket 服务器
type Proxy ¶ added in v0.0.23
type Proxy struct {
// contains filtered or unexported fields
}
func (*Proxy) GetServerIP ¶ added in v0.0.23
GetServerIP 获取GRPC SERVER IP
func (*Proxy) GetServerPort ¶ added in v0.0.23
GetServerPort 获取GRPC SERVER Port
func (*Proxy) GetSession ¶ added in v0.0.23
GetSession 获取Gate持有Session
Click to show internal directories.
Click to hide internal directories.