Documentation ¶
Index ¶
- type Server
- type ServerOption
- func DisableGoPool() ServerOption
- func KeepaliveParams(kp keepalive.ServerParameters) ServerOption
- func MaxChannelSize(size uint32) ServerOption
- func MaxGoPoolCapacity(size int) ServerOption
- func MaxReceiveMessageSize(size uint32) ServerOption
- func MaxSendMessageSize(size uint32) ServerOption
- func WithInboundMiddleware(mws ...less.Middleware) ServerOption
- func WithOnChannel(onChannel ...less.OnChannel) ServerOption
- func WithOnChannelClosed(onChannelClosed ...less.OnChannelClosed) ServerOption
- func WithOutboundMiddleware(mws ...less.Middleware) ServerOption
- func WithRouter(router router.Router) ServerOption
- func WithTransport(transport transport.Transport) ServerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a network server
func NewServer ¶
func NewServer(addr string, op ...ServerOption) *Server
NewServer creates a less server
type ServerOption ¶
type ServerOption func(options *serverOptions)
func KeepaliveParams ¶
func KeepaliveParams(kp keepalive.ServerParameters) ServerOption
KeepaliveParams sets keepalive parameters
func MaxChannelSize ¶
func MaxChannelSize(size uint32) ServerOption
MaxChannelSize sets the max size of channels
func MaxGoPoolCapacity ¶
func MaxGoPoolCapacity(size int) ServerOption
MaxGoPoolCapacity sets the max size of ants goroutine pool
func MaxReceiveMessageSize ¶
func MaxReceiveMessageSize(size uint32) ServerOption
MaxReceiveMessageSize sets the max size of message when receive
func MaxSendMessageSize ¶
func MaxSendMessageSize(size uint32) ServerOption
MaxSendMessageSize sets the max size of message when send
func WithInboundMiddleware ¶
func WithInboundMiddleware(mws ...less.Middleware) ServerOption
WithInboundMiddleware adds inbound middlewares
func WithOnChannel ¶
func WithOnChannel(onChannel ...less.OnChannel) ServerOption
WithOnChannel adds channel request hooks
func WithOnChannelClosed ¶
func WithOnChannelClosed(onChannelClosed ...less.OnChannelClosed) ServerOption
WithOnChannelClosed adds channel closed hooks
func WithOutboundMiddleware ¶
func WithOutboundMiddleware(mws ...less.Middleware) ServerOption
WithOutboundMiddleware adds outbound middlewares
func WithTransport ¶
func WithTransport(transport transport.Transport) ServerOption
WithTransport sets transporter
Click to show internal directories.
Click to hide internal directories.