Documentation
¶
Index ¶
- type ChannelBindings
- type ChannelType
- type Consumer
- type DeliveryMode
- type EnvelopeMarshaler
- type EnvelopeReader
- type EnvelopeUnmarshaler
- type EnvelopeWriter
- type ExchangeConfiguration
- type ExchangeType
- type MessageBindings
- type OperationBindings
- type Producer
- type Publisher
- type QueueConfiguration
- type ServerBindings
- type Subscriber
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelBindings ¶
type ChannelBindings struct { ChannelType ChannelType ExchangeConfiguration ExchangeConfiguration QueueConfiguration QueueConfiguration PublisherBindings OperationBindings SubscriberBindings OperationBindings }
type ChannelType ¶
type ChannelType string
const ( ChannelTypeRoutingKey ChannelType = "routingKey" ChannelTypeQueue ChannelType = "queue" )
type Consumer ¶
type Consumer interface {
Subscriber(ctx context.Context, channelName string, bindings *ChannelBindings) (Subscriber, error)
}
Sub
type DeliveryMode ¶
type DeliveryMode int
const ( DeliveryModeTransient DeliveryMode = 1 DeliveryModePersistent DeliveryMode = 2 )
type EnvelopeMarshaler ¶
type EnvelopeMarshaler interface {
MarshalAMQPEnvelope(envelope EnvelopeWriter) error
}
type EnvelopeReader ¶
type EnvelopeReader interface { io.Reader Headers() run.Headers Ack() error Nack(requeue bool) error Reject(requeue bool) error }
Sub
type EnvelopeUnmarshaler ¶
type EnvelopeUnmarshaler interface {
UnmarshalAMQPEnvelope(envelope EnvelopeReader) error
}
type EnvelopeWriter ¶
type EnvelopeWriter interface { io.Writer ResetPayload() SetHeaders(headers run.Headers) SetContentType(contentType string) SetBindings(bindings MessageBindings) SetRoutingKey(tag string) // TODO: remove? sets in SealEnvelope }
Pub
type ExchangeConfiguration ¶
type ExchangeConfiguration struct { Name *string // Empty name points to default broker exchange Type ExchangeType Durable *bool AutoDelete *bool VHost string }
type ExchangeType ¶
type ExchangeType string
const ( ExchangeTypeDefault ExchangeType = "default" ExchangeTypeTopic ExchangeType = "topic" ExchangeTypeDirect ExchangeType = "direct" ExchangeTypeFanout ExchangeType = "fanout" ExchangeTypeHeaders ExchangeType = "headers" )
type MessageBindings ¶
type OperationBindings ¶
type Producer ¶
type Producer interface {
Publisher(ctx context.Context, channelName string, bindings *ChannelBindings) (Publisher, error)
}
Pub
type Publisher ¶
type Publisher interface { Send(ctx context.Context, envelopes ...EnvelopeWriter) error Close() error }
Pub
type QueueConfiguration ¶
type ServerBindings ¶
type ServerBindings struct{}
type Subscriber ¶
type Subscriber interface { Receive(ctx context.Context, cb func(envelope EnvelopeReader)) error Close() error }
Sub
Click to show internal directories.
Click to hide internal directories.