Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncRequestResponseService ¶
type AsyncRequestResponseService interface { ClosableMessagingService Request(ctx context.Context, topic string, data []byte, timeout time.Duration) ([]byte, error) }
Async request response service interface
func NewNatsRequestResponseService ¶
func NewNatsRequestResponseService(config NatsMessagingConfig) (AsyncRequestResponseService, error)
type ClosableMessagingService ¶
type ClosableMessagingService interface {
Close() error
}
type MessageHandler ¶
Application defined handler function for incoming messages
type MessagingQueueSubscription ¶
type MessagingQueueSubscription interface {
Unsubscribe() error
}
Interface for a subscribed queue
type MessagingService ¶
type MessagingService interface { ClosableMessagingService Publish(ctx context.Context, topic string, data []byte) error QueueSubscribe(topic string, queue string, callback MessageHandler) (MessagingQueueSubscription, error) }
Low level messaging service interface
func NewNatsMessagingService ¶
func NewNatsMessagingService(config NatsMessagingConfig) (MessagingService, error)
type NatsMessagingConfig ¶
type NatsMessagingConfig struct {
NatsURL string
}
Click to show internal directories.
Click to hide internal directories.