Documentation ¶
Index ¶
- Constants
- func NewNATSConnection(uri string) (*nats.EncodedConn, error)
- type Bus
- type EventBusMock
- func (b *EventBusMock) Close() error
- func (b *EventBusMock) ListQueues() []string
- func (b *EventBusMock) Publish(event testkube.Event) error
- func (b *EventBusMock) PublishTopic(topic string, event testkube.Event) error
- func (b *EventBusMock) Subscribe(queue string, handler Handler) error
- func (b *EventBusMock) SubscribeTopic(topic, queue string, handler Handler) error
- func (b *EventBusMock) Unsubscribe(queue string) error
- type Handler
- type NATSBus
- func (n *NATSBus) Close() error
- func (n *NATSBus) Publish(event testkube.Event) error
- func (n *NATSBus) PublishTopic(topic string, event testkube.Event) error
- func (n *NATSBus) Subscribe(queueName string, handler Handler) error
- func (n *NATSBus) SubscribeTopic(topic, queueName string, handler Handler) error
- func (n *NATSBus) Unsubscribe(queueName string) error
Constants ¶
View Source
const ( SubscribeBuffer = 1 SubscriptionName = "events" )
Variables ¶
This section is empty.
Functions ¶
func NewNATSConnection ¶
Types ¶
type EventBusMock ¶ added in v1.5.33
type EventBusMock struct {
// contains filtered or unexported fields
}
func NewEventBusMock ¶ added in v1.5.33
func NewEventBusMock() *EventBusMock
func (*EventBusMock) Close ¶ added in v1.5.33
func (b *EventBusMock) Close() error
func (*EventBusMock) ListQueues ¶ added in v1.10.47
func (b *EventBusMock) ListQueues() []string
func (*EventBusMock) Publish ¶ added in v1.5.33
func (b *EventBusMock) Publish(event testkube.Event) error
func (*EventBusMock) PublishTopic ¶ added in v1.10.21
func (b *EventBusMock) PublishTopic(topic string, event testkube.Event) error
func (*EventBusMock) Subscribe ¶ added in v1.5.33
func (b *EventBusMock) Subscribe(queue string, handler Handler) error
func (*EventBusMock) SubscribeTopic ¶ added in v1.10.21
func (b *EventBusMock) SubscribeTopic(topic, queue string, handler Handler) error
func (*EventBusMock) Unsubscribe ¶ added in v1.5.33
func (b *EventBusMock) Unsubscribe(queue string) error
type NATSBus ¶
type NATSBus struct {
// contains filtered or unexported fields
}
func NewNATSBus ¶
func NewNATSBus(nc *nats.EncodedConn) *NATSBus
func (*NATSBus) PublishTopic ¶ added in v1.10.21
PublishTopic publishes event to NATS on given topic
func (*NATSBus) SubscribeTopic ¶ added in v1.10.21
SubscribeTopic subscribes to NATS topic
func (*NATSBus) Unsubscribe ¶
Click to show internal directories.
Click to hide internal directories.