plugin

package
v2.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServerBalancer

type ServerBalancer struct {
	ClientServer *http.Server
	ClientCoder  serialize.Serializer
}

func NewServerBalancer

func NewServerBalancer() *ServerBalancer

func (*ServerBalancer) AfterInit

func (b *ServerBalancer) AfterInit(s *rpc.ServerBase)

func (*ServerBalancer) Balance

func (b *ServerBalancer) Balance(remoteAddr string) (*treaty.Server, error)

func (*ServerBalancer) BeforeShutdown

func (b *ServerBalancer) BeforeShutdown(s *rpc.ServerBase)

func (*ServerBalancer) HandleBalance

func (b *ServerBalancer) HandleBalance(w http.ResponseWriter, r *http.Request)

func (*ServerBalancer) Init

func (b *ServerBalancer) Init(s *rpc.ServerBase)

func (*ServerBalancer) Shutdown

func (b *ServerBalancer) Shutdown(s *rpc.ServerBase)

func (*ServerBalancer) WriteResponse

func (b *ServerBalancer) WriteResponse(w http.ResponseWriter, msg proto.Message)

type ServerConnector

type ServerConnector struct {
	ClientServer tcpface.IServer         //client server
	RouteHandler func(s tcpface.IServer) //注册路由
}

func NewServerConnector

func NewServerConnector() *ServerConnector

func (*ServerConnector) AfterInit

func (b *ServerConnector) AfterInit(s *rpc.ServerBase)

func (*ServerConnector) BeforeShutdown

func (b *ServerConnector) BeforeShutdown(s *rpc.ServerBase)

func (*ServerConnector) Init

func (b *ServerConnector) Init(s *rpc.ServerBase)

func (*ServerConnector) Shutdown

func (b *ServerConnector) Shutdown(s *rpc.ServerBase)

type ServerHttp

type ServerHttp struct {
	// contains filtered or unexported fields
}

func NewServerHttp

func NewServerHttp(h rpc.HttpHandler) *ServerHttp

func (*ServerHttp) AfterInit

func (b *ServerHttp) AfterInit(s *rpc.ServerBase)

func (*ServerHttp) BeforeShutdown

func (b *ServerHttp) BeforeShutdown(s *rpc.ServerBase)

func (*ServerHttp) Init

func (b *ServerHttp) Init(s *rpc.ServerBase)

func (*ServerHttp) Run

func (b *ServerHttp) Run(s *rpc.ServerBase)

func (*ServerHttp) Shutdown

func (b *ServerHttp) Shutdown(s *rpc.ServerBase)

type ServerSocket

type ServerSocket struct {
	// contains filtered or unexported fields
}

func NewServerSocket

func NewServerSocket(ns string, opts *engineio.Options) *ServerSocket

func (*ServerSocket) AfterInit

func (b *ServerSocket) AfterInit(s *rpc.ServerBase)

func (*ServerSocket) BeforeShutdown

func (b *ServerSocket) BeforeShutdown(s *rpc.ServerBase)

func (*ServerSocket) Init

func (b *ServerSocket) Init(s *rpc.ServerBase)

func (*ServerSocket) OnConnect

func (b *ServerSocket) OnConnect(f func(socketio.Conn) error)

func (*ServerSocket) OnDisconnect

func (b *ServerSocket) OnDisconnect(f func(socketio.Conn, string))

func (*ServerSocket) OnError

func (b *ServerSocket) OnError(f func(socketio.Conn, error))

func (*ServerSocket) OnEvent

func (b *ServerSocket) OnEvent(event string, f interface{})

func (*ServerSocket) Run

func (b *ServerSocket) Run(s *rpc.ServerBase)

func (*ServerSocket) Shutdown

func (b *ServerSocket) Shutdown(s *rpc.ServerBase)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL