Documentation ¶
Index ¶
- Variables
- type Channel
- func (ch *Channel) AddPrioritizedCookies(cookies []*http.Cookie) error
- func (ch *Channel) AwaitHandler(handlerFn ChannelHandler)
- func (ch *Channel) Close()
- func (ch *Channel) Closed() <-chan struct{}
- func (ch *Channel) Context() context.Context
- func (ch *Channel) CountOutgoing()
- func (ch *Channel) DequeueOutgoingNonblock() (*message.MessageBuilder, error)
- func (ch *Channel) DequeueOutgoingTimeout(timeout time.Duration) (*message.MessageBuilder, error)
- func (ch *Channel) EnqueueIncomingNonblock(msg *message.Message) error
- func (ch *Channel) EnqueueOutgoing(ctx context.Context, msgb message.MessageBuilder) error
- func (ch *Channel) EnqueueOutgoingNonblock(msgb message.MessageBuilder) error
- func (ch *Channel) GetClientPollDelay() time.Duration
- func (ch *Channel) HandlerData() interface{}
- func (ch *Channel) HandlerDataUpdated() <-chan interface{}
- func (ch *Channel) HasNoOutgoingMessages() bool
- func (ch *Channel) Incomings() <-chan *message.Message
- func (ch *Channel) IsClosed() bool
- func (ch *Channel) IsStaleDuration(past time.Duration) bool
- func (ch *Channel) LogFields() logrus.Fields
- func (ch *Channel) PeekIncoming() (*message.Message, error)
- func (ch *Channel) PickPriorityCookies() []*http.Cookie
- func (ch *Channel) PopPriorityCookies() []*http.Cookie
- func (ch *Channel) PopPriorityData() []*http.Cookie
- func (ch *Channel) Receive() (*message.Message, error)
- func (ch *Channel) ReceiveNonblock() (*message.Message, error)
- func (ch *Channel) ResponseBuilder() message.MessageBuilder
- func (ch *Channel) RunMiddlewares(msg *message.Message) error
- func (ch *Channel) Send(b []byte) error
- func (ch *Channel) SendCookies(cookies []*http.Cookie) error
- func (ch *Channel) SendNonblock(b []byte) error
- func (ch *Channel) SendProto(p protobuf.Message) error
- func (ch *Channel) SendProtoNonblock(p protobuf.Message) error
- func (ch *Channel) SetHandlerData(hd interface{}) error
- func (ch *Channel) Shutdown() <-chan struct{}
- func (ch *Channel) Terminate(b []byte) error
- func (ch *Channel) TerminateNonblock(b []byte) error
- func (ch *Channel) TerminateProto(p protobuf.Message) error
- func (ch *Channel) TerminateProtoNonblock(p protobuf.Message) error
- func (ch *Channel) TerminateStatus(code int) error
- func (ch *Channel) TerminateStatusNonblock(code int) error
- func (ch *Channel) TerminationStatus() (bool, error)
- type ChannelBuilder
- func (b ChannelBuilder) Build() (*Channel, error)
- func (b ChannelBuilder) WithId(id string) ChannelBuilder
- func (b ChannelBuilder) WithMiddlewares(mws []ChannelMiddleware) ChannelBuilder
- func (b ChannelBuilder) WithShutdownContext(ctx context.Context) ChannelBuilder
- func (b ChannelBuilder) WithTimings(t *timings.ChannelTimings) ChannelBuilder
- type ChannelHandler
- type ChannelMiddleware
- type Channels
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrChannelClosed = errors.New("channel closed")
)
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { Id string // contains filtered or unexported fields }
func (*Channel) AddPrioritizedCookies ¶
func (*Channel) AwaitHandler ¶
func (ch *Channel) AwaitHandler(handlerFn ChannelHandler)
func (*Channel) CountOutgoing ¶
func (ch *Channel) CountOutgoing()
func (*Channel) DequeueOutgoingNonblock ¶
func (ch *Channel) DequeueOutgoingNonblock() (*message.MessageBuilder, error)
func (*Channel) DequeueOutgoingTimeout ¶
func (*Channel) EnqueueIncomingNonblock ¶
func (*Channel) EnqueueOutgoing ¶
func (*Channel) EnqueueOutgoingNonblock ¶
func (ch *Channel) EnqueueOutgoingNonblock(msgb message.MessageBuilder) error
func (*Channel) GetClientPollDelay ¶
func (*Channel) HandlerData ¶
func (ch *Channel) HandlerData() interface{}
func (*Channel) HandlerDataUpdated ¶
func (ch *Channel) HandlerDataUpdated() <-chan interface{}
func (*Channel) HasNoOutgoingMessages ¶
func (*Channel) PickPriorityCookies ¶
func (*Channel) PopPriorityCookies ¶
func (*Channel) PopPriorityData ¶
NOTE: This method could also return smth else besides cookies...
func (*Channel) ResponseBuilder ¶
func (ch *Channel) ResponseBuilder() message.MessageBuilder
func (*Channel) SendNonblock ¶
func (*Channel) SetHandlerData ¶
func (*Channel) TerminateNonblock ¶
func (*Channel) TerminateProtoNonblock ¶
func (*Channel) TerminateStatus ¶
func (*Channel) TerminateStatusNonblock ¶
func (*Channel) TerminationStatus ¶
type ChannelBuilder ¶
type ChannelBuilder struct {
// contains filtered or unexported fields
}
func Builder ¶
func Builder() ChannelBuilder
func (ChannelBuilder) Build ¶
func (b ChannelBuilder) Build() (*Channel, error)
func (ChannelBuilder) WithId ¶
func (b ChannelBuilder) WithId(id string) ChannelBuilder
func (ChannelBuilder) WithMiddlewares ¶
func (b ChannelBuilder) WithMiddlewares(mws []ChannelMiddleware) ChannelBuilder
func (ChannelBuilder) WithShutdownContext ¶
func (b ChannelBuilder) WithShutdownContext(ctx context.Context) ChannelBuilder
func (ChannelBuilder) WithTimings ¶
func (b ChannelBuilder) WithTimings(t *timings.ChannelTimings) ChannelBuilder
type ChannelHandler ¶
type ChannelMiddleware ¶
type ChannelMiddleware interface { Clone() ChannelMiddleware RunBeforePolling(*Channel, *message.Message) error }
type Channels ¶
type Channels struct {
// contains filtered or unexported fields
}
func NewChannels ¶
func NewChannels() *Channels
func (*Channels) SetByIdUnsafe ¶
Click to show internal directories.
Click to hide internal directories.