Versions in this module Expand all Collapse all v1 v1.0.1 Apr 5, 2022 Changes in this version + type ActiveContext interface + HandleActive func() + type ActiveHandler interface + HandleActive func(ctx ActiveContext) + type ActiveHandlerFunc func(ctx ActiveContext) + func (fn ActiveHandlerFunc) HandleActive(ctx ActiveContext) + type Attachment interface + type Bootstrap interface + Connect func(url string, attachment Attachment, option ...transport.Option) (Channel, error) + Context func() context.Context + Listen func(url string, option ...transport.Option) Listener + Shutdown func() + func NewBootstrap(option ...Option) Bootstrap + type Channel interface + Attachment func() Attachment + Close func(err error) + Context func() context.Context + ID func() int64 + IsActive func() bool + LocalAddr func() string + Pipeline func() Pipeline + RemoteAddr func() string + SetAttachment func(Attachment) + Transport func() transport.Transport + Trigger func(event Event) + Write func(Message) bool + Writev func([][]byte) (int64, error) + type ChannelFactory func(id int64, ctx context.Context, pipeline Pipeline, ...) Channel + func NewBufferedChannel(capacity int, sizeRead int) ChannelFactory + func NewChannel(capacity int) ChannelFactory + type ChannelHandler interface + type ChannelIDFactory func() int64 + func SequenceID() ChannelIDFactory + type ChannelInboundHandler interface + func ReadIdleHandler(idleTime time.Duration) ChannelInboundHandler + type ChannelInitializer func(Channel) + type ChannelOutboundHandler interface + func WriteIdleHandler(idleTime time.Duration) ChannelOutboundHandler + type CodecHandler interface + CodecName func() string + type Event interface + type EventContext interface + HandleEvent func(event Event) + type EventHandler interface + HandleEvent func(ctx EventContext, event Event) + type EventHandlerFunc func(ctx EventContext, event Event) + func (fn EventHandlerFunc) HandleEvent(ctx EventContext, event Event) + type Exception interface + Error func() string + PrintStackTrace func(writer io.Writer, msg ...string) + Stack func() []byte + Unwrap func() error + func AsException(e interface{}, stack []byte) Exception + type ExceptionContext interface + HandleException func(ex Exception) + type ExceptionHandler interface + HandleException func(ctx ExceptionContext, ex Exception) + type ExceptionHandlerFunc func(ctx ExceptionContext, ex Exception) + func (fn ExceptionHandlerFunc) HandleException(ctx ExceptionContext, ex Exception) + type Handler interface + type HandlerContext interface + Attachment func() Attachment + Channel func() Channel + Close func(err error) + Handler func() Handler + SetAttachment func(Attachment) + Trigger func(event Event) + Write func(message Message) + type InactiveContext interface + HandleInactive func(ex Exception) + type InactiveHandler interface + HandleInactive func(ctx InactiveContext, ex Exception) + type InactiveHandlerFunc func(ctx InactiveContext, ex Exception) + func (fn InactiveHandlerFunc) HandleInactive(ctx InactiveContext, ex Exception) + type InboundContext interface + HandleRead func(message Message) + type InboundHandler interface + HandleRead func(ctx InboundContext, message Message) + type InboundHandlerFunc func(ctx InboundContext, message Message) + func (fn InboundHandlerFunc) HandleRead(ctx InboundContext, message Message) + type Listener interface + Async func(func(error)) + Close func() error + Sync func() error + type Message interface + type Option func(options *bootstrapOptions) + func WithChannel(channelFactory ChannelFactory) Option + func WithChannelID(channelIDFactory ChannelIDFactory) Option + func WithChildInitializer(initializer ChannelInitializer) Option + func WithClientInitializer(initializer ChannelInitializer) Option + func WithContext(ctx context.Context) Option + func WithPipeline(pipelineFactory PipelineFactory) Option + func WithTransport(transportFactory TransportFactory) Option + type OutboundContext interface + HandleWrite func(message Message) + type OutboundHandler interface + HandleWrite func(ctx OutboundContext, message Message) + type OutboundHandlerFunc func(ctx OutboundContext, message Message) + func (fn OutboundHandlerFunc) HandleWrite(ctx OutboundContext, message Message) + type Pipeline interface + AddFirst func(handlers ...Handler) Pipeline + AddHandler func(position int, handlers ...Handler) Pipeline + AddLast func(handlers ...Handler) Pipeline + Channel func() Channel + ContextAt func(position int) HandlerContext + FireChannelActive func() + FireChannelEvent func(event Event) + FireChannelException func(ex Exception) + FireChannelInactive func(ex Exception) + FireChannelRead func(message Message) + FireChannelWrite func(message Message) + IndexOf func(func(Handler) bool) int + LastIndexOf func(func(Handler) bool) int + ServeChannel func(channel Channel) + Size func() int + func NewPipelineWith() Pipeline + type PipelineFactory func() Pipeline + func NewPipeline() PipelineFactory + type ReadIdleEvent struct + type SimpleChannelHandler = ChannelInboundHandler + type TransportFactory transport.Factory + type WriteIdleEvent struct