Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DestinationType ¶
type DestinationType string
DestinationType is where the message will be sent, either directly to a queue or to an exchange
const ( DestinationTypeQueue DestinationType = "queue" DestinationTypeExchange DestinationType = "exchange" )
type GooglePubSubPublisher ¶ added in v0.0.3
type GooglePubSubPublisher struct {
// contains filtered or unexported fields
}
GooglePubSubPublisher is a publisher that can send messages to a Google Pub/Sub server
func NewGooglePubSubPublisher ¶ added in v0.0.3
func NewGooglePubSubPublisher(cfg *config.Config) (*GooglePubSubPublisher, error)
NewGooglePubSubPublisher will create a connection to a Google Pub/Sub server. Shutdown on the returned publisher should be called to close the connection once finished
func (*GooglePubSubPublisher) Send ¶ added in v0.0.3
func (p *GooglePubSubPublisher) Send(destination string, msg service.Message) error
Send will send the provided message
func (*GooglePubSubPublisher) Shutdown ¶ added in v0.0.3
func (p *GooglePubSubPublisher) Shutdown()
Shutdown will close the Google Pub/Sub connection
type NatsPublisher ¶
type NatsPublisher struct {
// contains filtered or unexported fields
}
NatsPublisher is a publisher that can send messages to a NATs server
func NewNatsPublisher ¶
func NewNatsPublisher(cfg *config.Config) (*NatsPublisher, error)
NewNatsPublisher will create a connection to a NATs server. Shutdown on the returned publisher should be called to close the connection once finished
func (*NatsPublisher) Send ¶
func (p *NatsPublisher) Send(destination string, msg service.Message) error
Send will send the provided message
func (*NatsPublisher) Shutdown ¶
func (p *NatsPublisher) Shutdown()
Shutdown will close the NATs connection
type RabbitPublisher ¶
type RabbitPublisher struct {
// contains filtered or unexported fields
}
RabbitPublisher is a publisher that can send messages to a RabbitMQ server
func NewRabbitPublisher ¶
func NewRabbitPublisher(cfg *config.Config) (*RabbitPublisher, error)
NewRabbitPublisher will create a connection to a RabbitMQ server. Shutdown on the returned publisher should be called to close the connection once finished
func (*RabbitPublisher) Send ¶
func (r *RabbitPublisher) Send(destinationName string, msg service.Message) error
Send will send the provided message
func (*RabbitPublisher) Shutdown ¶
func (r *RabbitPublisher) Shutdown()
Shutdown will close the RabbitMQ connection
type RedisPublisher ¶
type RedisPublisher struct {
// contains filtered or unexported fields
}
RedisPublisher is a publisher that can send messages to a Redis server
func NewRedisPublisher ¶
func NewRedisPublisher(cfg *config.Config) (*RedisPublisher, error)
NewRedisPublisher will create a connection to a Redis server. Shutdown on the returned publisher should be called to close the connection once finished
func (*RedisPublisher) Send ¶
func (p *RedisPublisher) Send(destination string, msg service.Message) error
Send will send the provided message
func (*RedisPublisher) Shutdown ¶
func (p *RedisPublisher) Shutdown()
Shutdown will close the Redis connection