gcppubsub

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(opts *cli.Options) (*pubsub.Client, error)

func Read

func Read(opts *cli.Options) error

func Relay added in v0.4.0

func Relay(opts *cli.Options) error

func Write

func Write(opts *cli.Options) error

Write is the entry point function for performing write operations in GCP PubSub.

This is where we verify that the passed args and flags combo makes sense, attempt to establish a connection, parse protobuf before finally attempting to perform the write.

Types

type GCPPubSub

type GCPPubSub struct {
	Options *cli.Options
	MsgDesc *desc.MessageDescriptor
	Client  *pubsub.Client
	// contains filtered or unexported fields
}

func (*GCPPubSub) Read

func (g *GCPPubSub) Read() error

func (*GCPPubSub) Write

func (g *GCPPubSub) Write(ctx context.Context, value []byte) error

Write is a wrapper for amqp Publish method. We wrap it so that we can mock it in tests, add logging etc.

Jump to

Keyboard shortcuts

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