eventbus

package
v0.0.0-...-d7f9ed7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPublisher

func AddPublisher(topicName string, publisher Publisher)

func InitializeDevPublishers

func InitializeDevPublishers(topicNames []string) error

Types

type Publisher

type Publisher interface {
	Publish(message interface{}) error
}

func GetPublisher

func GetPublisher(topicName string) Publisher

func NewVirtualPublisher

func NewVirtualPublisher(topicName string) Publisher

type SubscriptionConfig

type SubscriptionConfig struct {
	ExpirationDays     int
	RetentionDays      int
	AckDeadlineSeconds int
}

func DefaultSubscriptionConfig

func DefaultSubscriptionConfig() SubscriptionConfig

type SubscriptionCreator

type SubscriptionCreator interface {
	CreateSubscription(subscriptionName, topicName, endpoint string, config SubscriptionConfig) error
}

type TopicCreator

type TopicCreator interface {
	CreateTopic(topicName string) error
}

type VirtualPublisher

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

func (*VirtualPublisher) CreateSubscription

func (v *VirtualPublisher) CreateSubscription(subscriptionName string, topicName string, endpoint string, config SubscriptionConfig) error

CreateSubscription implements Publisher.

func (*VirtualPublisher) CreateTopic

func (v *VirtualPublisher) CreateTopic(topicName string) error

CreateTopic implements Publisher.

func (*VirtualPublisher) Publish

func (v *VirtualPublisher) Publish(message interface{}) error

Publish implements Publisher.

func (*VirtualPublisher) PushMessage

func (v *VirtualPublisher) PushMessage(message interface{}) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL