Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bag ¶ added in v0.4.0
Bag type is an abstract container for octet stream, exchanged via channels. It is used by queuing transport to abstract message on the wire.
type Dequeue ¶ added in v0.4.0
type Dequeue interface {
// Listent activates transport
Listen() error
// Close transport
Close() error
// Deq returns a channel to dequeue messages
Deq() chan *Bag
// Ack returns a channel to acknowledge message processign
Ack() chan *Bag
}
Dequeue is an abstraction of transport protocol to receive messages from queueing system (broker). Dequeue is an abstraction of transport client.
type Enqueue ¶ added in v0.4.0
type Enqueue interface {
// Listent activates transport
Listen() error
// Close transport
Close() error
// Enq returns a channel to enqueue messages
Enq() chan *BagStdErr
// Enqueue synchronously message
EnqSync(*Bag) error
}
Enqueue is an abstraction of transport protocols to send messages for the processing to queueing system (broker). Enqueue is an abstraction of transport client.
type Msg ¶
Msg is a generic envelop type for incoming messages. It contains both decoded object and its digest used to acknowledge message.
type Policy ¶ added in v0.4.0
type Policy struct {
BackoffIO backoff.Seq
PollFrequency time.Duration
TimeToFlight time.Duration
QueueCapacity int
}
Policy defines behavior of queue
func (*Policy) WithBackoffIO ¶ added in v0.4.0
WithBackoffIO configures retry of queue I/O
swarm.NewPolicy(). WithBackoffIO(backoff.Exp(...))
func (*Policy) WithPollFrequency ¶ added in v0.4.0
WithPollFrequency configures frequency of polling loop
swarm.NewPolicy(). WithPollFrequency(5*time.Seconds)
func (*Policy) WithQueueCapacity ¶ added in v0.4.0
type System ¶
type System interface {
ID() string
// Create new queueing endpoint from transport
Queue(string, Enqueue, Dequeue, *Policy) Queue
// Listent activates all transport
Listen() error
// Close system and all queues
Close()
// Wait for system to be stopped
Wait()
}
System of Queues controls group related queues.
Directories
¶
| Path | Synopsis |
|---|---|
|
broker
|
|
|
embedded
module
|
|
|
eventbridge
module
|
|
|
eventddb
module
|
|
|
events3
module
|
|
|
eventsqs
module
|
|
|
sqs
module
|
|
|
websocket
module
|
|
|
examples
|
|
|
eventbridge/recv
command
|
|
|
eventbridge/send
command
|
|
|
eventbridge/serverless
command
|
|
|
eventsqs/recv
command
|
|
|
eventsqs/send
command
|
|
|
eventsqs/serverless
command
|
|
|
sqs/recv
command
|
|
|
sqs/send
command
|
|
|
internal
|
|
|
qtest
module
|
|