Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter interface { // Publish publishes a events to a channel. Publish(ctx context.Context, channel string, event Event) error // Subscribe subscribes to a channel. Subscribe(ctx context.Context, channel string) (Subscription, error) // HasSubscribers returns true if there are subscribers to the given pattern. HasSubscribers(ctx context.Context, pattern string) bool }
Adapter is an interface for a pubsub adapter. It allows to publish and subscribe []PubsubEvent to views.
type Subscription ¶
type Subscription interface { // C returns a receive-only go channel of events published C() <-chan Event // Close closes the subscription. Close() }
Subscription is a subscription to a channel.
Click to show internal directories.
Click to hide internal directories.