Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACKingAdapter ¶
type ACKingAdapter struct { // Deserializer used to deserialize events back to golang struct. Deserializer Deserializer Channel *amqp.Channel // Name of queue to receive from Queue string // Name of consumer Consumer string // contains filtered or unexported fields }
AckingAdapter fits gebus' ACKingAdapter interface. It's able to receive jobs as a messages from AMQP queue.
Note: closing this adapter closes entire AMQP channel.
func (*ACKingAdapter) ACKPositive ¶
func (aa *ACKingAdapter) ACKPositive() (err error)
func (*ACKingAdapter) Close ¶
func (aa *ACKingAdapter) Close() (err error)
func (*ACKingAdapter) GetCurrentEvent ¶
func (aa *ACKingAdapter) GetCurrentEvent() interface{}
func (*ACKingAdapter) Initialize ¶
func (aa *ACKingAdapter) Initialize() (err error)
Initializes adapter making it able ot receive messages.
type Client ¶
type Client struct { Serializer Serializer // AMQP channel to use. Channel *amqp.Channel // ExchangeFunc provides exchange to use for specified event. // It's mandatory. ExchangeFunc func(ctx context.Context, event interface{}) (exchange string, err error) // KeyFunc provides key to use for specified event. // It's not mandatory. Default key is blank string. // In some exchanges key is ignored, so this is fine. KeyFunc func(ctx context.Context, event interface{}) (key string, err error) }
Client is event handler, which sends messages to specified AMQP exchange.
type Delivery ¶
type Delivery struct {
// contains filtered or unexported fields
}
func (Delivery) GetContentType ¶
func (Delivery) GetHeaders ¶
type Deserializer ¶
type Publishing ¶
type Serializer ¶
type Serializer interface {
SerializeEvent(ctx context.Context, event interface{}) (pub Publishing, err error)
}
Click to show internal directories.
Click to hide internal directories.