pubsub

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener

type Listener struct {
	// contains filtered or unexported fields
}

Listener is a pubsub server that pipes messages off to its events.Processor

func NewListener

func NewListener(ctx context.Context, logger *zap.Logger, pubsubProject string, subscriptionName string,
	credentials []byte, clusterData *core.ClusterData, processor *events.Processor) (*Listener, error)

NewListener is a constructor for Listener with field validation

func (*Listener) Start

func (l *Listener) Start() error

Start starts up the pubsub server and pipes incoming messages to the Listener's events.Processor

type Message

type Message struct {
	Digest string `json:"digest"`
	Tag    string `json:"tag"`
}

Message json deserialization target for pubsub messages

Jump to

Keyboard shortcuts

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