redis

package
v0.0.0-...-5020eea Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCouldNotMarshalEvent = errors.New("could not marshal event")

ErrCouldNotMarshalEvent is when an event could not be marshaled into BSON.

View Source
var ErrCouldNotUnmarshalEvent = errors.New("could not unmarshal event")

ErrCouldNotUnmarshalEvent is when an event could not be unmarshaled into a concrete type.

Functions

This section is empty.

Types

type EventPublisher

type EventPublisher struct {
	*local.EventPublisher
	// contains filtered or unexported fields
}

EventPublisher is an event bus that notifies registered EventHandlers of published events. It will use the SimpleEventHandlingStrategy by default.

func NewEventPublisher

func NewEventPublisher(appID, server, password string) (*EventPublisher, error)

NewEventPublisher creates a EventPublisher for remote events.

func NewEventPublisherWithPool

func NewEventPublisherWithPool(appID string, pool *redis.Pool) (*EventPublisher, error)

NewEventPublisherWithPool creates a EventPublisher for remote events.

func (*EventPublisher) Close

func (b *EventPublisher) Close() error

Close exits the receive goroutine by unsubscribing to all channels.

func (*EventPublisher) PublishEvent

func (b *EventPublisher) PublishEvent(ctx context.Context, event eh.Event) error

PublishEvent publishes an event to all handlers capable of handling it.

Jump to

Keyboard shortcuts

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