Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
func NewConnector ¶
func NewConnector(cfg ConnectorConfig) *Connector
type ConnectorConfig ¶
type ConnectorConfig struct { Name string `validate:"required"` ReconnectionAttempts int `validate:"required,min=1"` URI struct { Host string `validate:"required"` Port int `validate:"required,min=0"` Username string `validate:"required"` Password string `validate:"required"` Vhost string `validate:"required"` CertFile string // client TLS auth - path to certificate (PEM) CACertFile string // client TLS auth - path to CA certificate (PEM) KeyFile string // client TLS auth - path to private key (PEM) ServerName string // client TLS auth - server name } `validate:"required"` Exchange string UseDurableQueues bool }
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
func NewConsumer ¶
func NewConsumer(cfg ConnectorConfig) *Consumer
func (*Consumer) AddSubscriber ¶
func (c *Consumer) AddSubscriber(queueName string, handler NotificationHandler)
type NotificationHandler ¶
func NewHandler ¶
func NewHandler[T any]( handler func(context.Context, *T) error, ) NotificationHandler
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
func NewPublisher ¶
func NewPublisher(cfg ConnectorConfig) *Publisher
Click to show internal directories.
Click to hide internal directories.