Documentation
¶
Index ¶
- type Client
- type ClientOption
- func WithConsumers(consumers ...consumer.Consumer) ClientOption
- func WithDeclarations(declarations topology.Declarations) ClientOption
- func WithDialConfig(config DialConfig) ClientOption
- func WithObserver(observer Observer) ClientOption
- func WithPublishers(publishers ...*publisher.Publisher) ClientOption
- func WithReconnectTimeout(timeout time.Duration) ClientOption
- func WithTopologyBuilding(options ...topology.DeclarationsOption) ClientOption
- type Consumer
- type Declarator
- type DialConfig
- type NoopObserver
- func (n NoopObserver) ClientError(err error)
- func (n NoopObserver) ClientReady()
- func (n NoopObserver) ConsumerError(consumer consumer.Consumer, err error)
- func (n NoopObserver) PublisherError(publisher *publisher.Publisher, err error)
- func (n NoopObserver) PublishingFlow(publisher *publisher.Publisher, flow bool)
- func (n NoopObserver) ShutdownDone()
- func (n NoopObserver) ShutdownStarted()
- type Observer
- type Publisher
- func (p *Publisher) Close() error
- func (p *Publisher) Publish(ctx context.Context, exchange string, routingKey string, msg *amqp.Publishing) error
- func (p *Publisher) PublishWithConfirmation(ctx context.Context, exchange string, routingKey string, msg *amqp.Publishing) error
- func (p *Publisher) Run() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(url string, options ...ClientOption) *Client
func (*Client) Run ¶
Run Block and wait first successfully established session It means all declarations were applied successfully All publishers were initialized All consumers were run Returns first occurred error during first session opening or nil
type ClientOption ¶
type ClientOption func(c *Client)
func WithConsumers ¶
func WithConsumers(consumers ...consumer.Consumer) ClientOption
func WithDeclarations ¶
func WithDeclarations(declarations topology.Declarations) ClientOption
func WithDialConfig ¶ added in v1.5.0
func WithDialConfig(config DialConfig) ClientOption
func WithObserver ¶
func WithObserver(observer Observer) ClientOption
func WithPublishers ¶
func WithPublishers(publishers ...*publisher.Publisher) ClientOption
func WithReconnectTimeout ¶
func WithReconnectTimeout(timeout time.Duration) ClientOption
func WithTopologyBuilding ¶
func WithTopologyBuilding(options ...topology.DeclarationsOption) ClientOption
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
func NewConsumer ¶
type Declarator ¶
type Declarator struct {
// contains filtered or unexported fields
}
func NewDeclarator ¶
func NewDeclarator(cfg topology.Declarations, ch *amqp.Channel) *Declarator
func (*Declarator) Close ¶
func (c *Declarator) Close() error
func (*Declarator) Run ¶
func (c *Declarator) Run() error
type NoopObserver ¶
type NoopObserver struct { }
func (NoopObserver) ClientError ¶
func (n NoopObserver) ClientError(err error)
func (NoopObserver) ClientReady ¶
func (n NoopObserver) ClientReady()
func (NoopObserver) ConsumerError ¶
func (n NoopObserver) ConsumerError(consumer consumer.Consumer, err error)
func (NoopObserver) PublisherError ¶ added in v1.2.0
func (n NoopObserver) PublisherError(publisher *publisher.Publisher, err error)
func (NoopObserver) PublishingFlow ¶ added in v1.2.0
func (n NoopObserver) PublishingFlow(publisher *publisher.Publisher, flow bool)
func (NoopObserver) ShutdownDone ¶
func (n NoopObserver) ShutdownDone()
func (NoopObserver) ShutdownStarted ¶
func (n NoopObserver) ShutdownStarted()
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
func NewPublisher ¶
func (*Publisher) PublishWithConfirmation ¶ added in v1.4.0
Source Files
¶
Click to show internal directories.
Click to hide internal directories.