pubsub

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnknown is raised when trying to operate on an unpicked gcp client.
	ErrUnknown = errors.New("unknown client")

	// ErrInvalidInstance is raised when trying to  operate on a non gcp instance.
	ErrInvalidInstance = errors.New("expected GCP instance")
)

Functions

This section is empty.

Types

type Google

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

Google manages instance for kactus Google and provides tools to manipulate and asserts on known postgres databases.

func NewGoogle

func NewGoogle(pickerInstance *picker.Picker, clients ...GoogleInfo) *Google

NewGoogle initializes a postgres kactus manager for provided google pubsub client instances.

func (Google) Debug

func (Google) Debug() error

Debug start debug logs. It will be removed when calling Reset.

func (Google) DisableDebug

func (Google) DisableDebug() error

DisableDebug stops debugging.

func (*Google) HasMessage

func (gcp *Google) HasMessage(instance string, within int, data *godog.Table) error

HasMessage asserts client received a message matching provided data.

func (*Google) HasMessageWithMetadata

func (gcp *Google) HasMessageWithMetadata(instance string, within int, data *godog.Table) error

HasMessageWithMetadata asserts client received a message matching provided meta data.

func (*Google) Reset

func (gcp *Google) Reset()

Reset resets google instance.

func (*Google) SendMessage

func (gcp *Google) SendMessage(instance, topic string, data *godog.DocString) error

type GoogleInfo

type GoogleInfo struct {
	Key    string
	Client *pubsub.Client
}

GoogleInfo provides a structure to register a new google pubsub client instance to kactus.

Key will be used to to pick instance. `gcp.` will be append to provided key when picking.

Client indicates *pubsub.Client instance to store under provided key.

Jump to

Keyboard shortcuts

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