unifrost: github.com/unifrost/unifrost/drivers/rabbitdriver Index | Files

package rabbitdriver

import "github.com/unifrost/unifrost/drivers/rabbitdriver"

Index

Package Files

rabbitmq.go

type Client Uses

type Client struct {
    // contains filtered or unexported fields
}

Client handles the subscriptions to rabbit amqp topics

func NewClient Uses

func NewClient(ctx context.Context, rabbitConn *amqp.Connection, opts ...Option) (*Client, error)

NewClient returns *rabbitmq.Client, also creates a RabbitMQ broker subscription client.

Additional configuration options can be added with rabbitpubsub.Option functions.

func (*Client) Close Uses

func (client *Client) Close(ctx context.Context) error

Close closes the connection to rabbit amqp server

func (*Client) Subscribe Uses

func (client *Client) Subscribe(ctx context.Context, topic string) (*pubsub.Subscription, error)

Subscribe method subscribes to the rabbit amqp topic

type Option Uses

type Option func(*Client) error

Option is a self-refrential function for configuration parameters

Package rabbitdriver imports 4 packages (graph). Updated 2020-03-03. Refresh now. Tools for package owners.