Documentation ¶
Index ¶
- type HandlerService
- func (h *HandlerService) Dispatch(thread int)
- func (h *HandlerService) Docs(getPtrNames bool) (map[string]interface{}, error)
- func (h *HandlerService) DumpServices()
- func (h *HandlerService) Handle(conn net.Conn)
- func (h *HandlerService) Register(comp component.Component, opts []component.Option) error
- type RemoteService
- func (r *RemoteService) AddRemoteBindingListener(bindingListener cluster.RemoteBindingListener)
- func (r *RemoteService) Call(ctx context.Context, req *protos.Request) (*protos.Response, error)
- func (r *RemoteService) DoRPC(ctx context.Context, serverID string, route *route.Route, protoData []byte) (*protos.Response, error)
- func (r *RemoteService) Docs(getPtrNames bool) (map[string]interface{}, error)
- func (r *RemoteService) DumpServices()
- func (r *RemoteService) KickUser(ctx context.Context, kick *protos.KickMsg) (*protos.KickAnswer, error)
- func (r *RemoteService) PushToUser(ctx context.Context, push *protos.Push) (*protos.Response, error)
- func (r *RemoteService) RPC(ctx context.Context, serverID string, route *route.Route, reply proto.Message, ...) error
- func (r *RemoteService) Register(comp component.Component, opts []component.Option) error
- func (r *RemoteService) SessionBindRemote(ctx context.Context, msg *protos.BindMsg) (*protos.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerService ¶
type HandlerService struct {
// contains filtered or unexported fields
}
HandlerService service
func NewHandlerService ¶
func NewHandlerService( dieChan chan bool, packetDecoder codec.PacketDecoder, packetEncoder codec.PacketEncoder, serializer serialize.Serializer, heartbeatTime time.Duration, messagesBufferSize, localProcessBufferSize, remoteProcessBufferSize int, server *cluster.Server, remoteService *RemoteService, messageEncoder message.Encoder, metricsReporters []metrics.Reporter, ) *HandlerService
NewHandlerService creates and returns a new handler service
func (*HandlerService) Dispatch ¶
func (h *HandlerService) Dispatch(thread int)
Dispatch message to corresponding logic handler
func (*HandlerService) Docs ¶ added in v0.7.6
func (h *HandlerService) Docs(getPtrNames bool) (map[string]interface{}, error)
Docs returns documentation for handlers
func (*HandlerService) DumpServices ¶
func (h *HandlerService) DumpServices()
DumpServices outputs all registered services
func (*HandlerService) Handle ¶
func (h *HandlerService) Handle(conn net.Conn)
Handle handles messages from a conn
type RemoteService ¶
type RemoteService struct {
// contains filtered or unexported fields
}
RemoteService struct
func NewRemoteService ¶
func NewRemoteService( rpcClient cluster.RPCClient, rpcServer cluster.RPCServer, sd cluster.ServiceDiscovery, encoder codec.PacketEncoder, serializer serialize.Serializer, router *router.Router, messageEncoder message.Encoder, server *cluster.Server, ) *RemoteService
NewRemoteService creates and return a new RemoteService
func (*RemoteService) AddRemoteBindingListener ¶
func (r *RemoteService) AddRemoteBindingListener(bindingListener cluster.RemoteBindingListener)
AddRemoteBindingListener adds a listener
func (*RemoteService) DoRPC ¶
func (r *RemoteService) DoRPC(ctx context.Context, serverID string, route *route.Route, protoData []byte) (*protos.Response, error)
DoRPC do rpc and get answer
func (*RemoteService) Docs ¶ added in v0.7.6
func (r *RemoteService) Docs(getPtrNames bool) (map[string]interface{}, error)
Docs returns documentation for remotes
func (*RemoteService) DumpServices ¶
func (r *RemoteService) DumpServices()
DumpServices outputs all registered services
func (*RemoteService) KickUser ¶ added in v0.7.6
func (r *RemoteService) KickUser(ctx context.Context, kick *protos.KickMsg) (*protos.KickAnswer, error)
KickUser sends a kick to user
func (*RemoteService) PushToUser ¶
func (r *RemoteService) PushToUser(ctx context.Context, push *protos.Push) (*protos.Response, error)
PushToUser sends a push to user
func (*RemoteService) RPC ¶
func (r *RemoteService) RPC(ctx context.Context, serverID string, route *route.Route, reply proto.Message, arg proto.Message) error
RPC makes rpcs
func (*RemoteService) SessionBindRemote ¶
func (r *RemoteService) SessionBindRemote(ctx context.Context, msg *protos.BindMsg) (*protos.Response, error)
SessionBindRemote is called when a remote server binds a user session and want us to acknowledge it