Documentation ¶
Index ¶
Constants ¶
View Source
const ( UnpublishedEventsCheckInterval = 1 * time.Minute ConnCheckInterval = 100 * time.Millisecond MaxUnpublishedEvents uint64 = 1e4 MaxEventStreamLen int64 = 1e6 )
Variables ¶
This section is empty.
Functions ¶
func ReadStringSlice ¶
ReadStringSlice reads string slice from event map. If value is not a string slice, returns empty slice.
Types ¶
type EventHandler ¶
type EventHandler interface { // Handle handles events passed by underlying implementation. Handle(ctx context.Context, event Event) error }
EventHandler represents event handler for Subscriber.
type Publisher ¶
type Publisher interface { // Publish publishes event to stream. Publish(ctx context.Context, event Event) error // Close gracefully closes event publisher's connection. Close() error }
Publisher specifies events publishing API.
type Subscriber ¶
type Subscriber interface { // Subscribe subscribes to the event stream and consumes events. Subscribe(ctx context.Context, cfg SubscriberConfig) error // Close gracefully closes event subscriber's connection. Close() error }
Subscriber specifies event subscription API.
type SubscriberConfig ¶
type SubscriberConfig struct { Consumer string Stream string Handler EventHandler }
SubscriberConfig represents event subscriber configuration.
Directories ¶
Path | Synopsis |
---|---|
Package redis contains the domain concept definitions needed to support Magistrala redis events source service functionality.
|
Package redis contains the domain concept definitions needed to support Magistrala redis events source service functionality. |
Package redis contains the domain concept definitions needed to support Magistrala redis events source service functionality.
|
Package redis contains the domain concept definitions needed to support Magistrala redis events source service functionality. |
Package redis contains the domain concept definitions needed to support Magistrala redis events source service functionality.
|
Package redis contains the domain concept definitions needed to support Magistrala redis events source service functionality. |
Click to show internal directories.
Click to hide internal directories.