Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoogleProviderSettings ¶
type GoogleProviderSettings struct { ProjectID string CredentialsFile string SubscriptionSuffix string CreateTopic bool CreateSubscription bool }
GoogleProviderSettings type
type IPubSub ¶
type IPubSub interface { Publish(ctx context.Context, topic string, msg []byte) error Subscribe(ctx context.Context, topic string, handler MsgHandler) (ISubscription, error) SubscribeChan(ctx context.Context, topic string, channel chan []byte) (ISubscription, error) }
IPubSub Interface
type MsgHandler ¶
type MsgHandler func(msg []byte)
MsgHandler is a callback function that processes messages delivered to asynchronous subscribers.
type NatsProviderSettings ¶
NatsProviderSettings type
type ProviderType ¶
type ProviderType string
ProviderType the type of provider
const ( // GooglePubSubProvider type GooglePubSubProvider ProviderType = "googlePubSub" // NatsProvider type NatsProvider ProviderType = "nats" // MemoryProvider type MemoryProvider ProviderType = "memory" )
type Settings ¶
type Settings struct { Provider ProviderType Google GoogleProviderSettings Nats NatsProviderSettings }
Settings for the pub sub
Click to show internal directories.
Click to hide internal directories.