pubsub

package
v0.5.12 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PubSubClient *pubsub.Client

PubSubClient -_-

Functions

func DecodeJSONEvent added in v0.3.1

func DecodeJSONEvent(m Message, dst interface{}) errors.ErouskaError

DecodeJSONEvent Decodes and validates PubSub message into given interface.

Types

type Client

type Client struct{}

Client Real PubSub client.

func (Client) Publish

func (c Client) Publish(topic string, msg interface{}) error

Publish Publish message to some topic.

type EventPublisher

type EventPublisher interface {
	Publish(topic string, msg interface{}) error
}

EventPublisher is an abstraction over PubSub

type Message

type Message struct {
	Data []byte `json:"data"`
}

Message is the payload of a Pub/Sub event.

type MockClient

type MockClient struct{}

MockClient NOOP PubSub client.

func (MockClient) Publish

func (c MockClient) Publish(topic string, msg interface{}) error

Publish Publish message to some topic.

Jump to

Keyboard shortcuts

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