gcp

package
v0.0.0-...-e43f319 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2017 License: Apache-2.0 Imports: 10 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(projectID, appID string) (*EventPublisher, error)

NewEventPublisher creates a EventPublisher.

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 implements the PublishEvent method of the eventhorizon.EventPublisher interface.

Jump to

Keyboard shortcuts

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