bus

package
v0.0.0-...-93913ae Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// GCP Project ID
	ProjectID string
	Ctx       context.Context
	Opts      []option.ClientOption
	Instance  *pubsub.Client
}

Client defines the client to communicate with the message bus.

func (*Client) Connect

func (c *Client) Connect() error

Connect establishes connector to the message broker.

func (*Client) Push

func (c *Client) Push(payload []byte, topic string) error

Push pushes the message to a topic.

func (*Client) PushRoutine

func (c *Client) PushRoutine(payload []byte, topic string, ch chan error)

PushRoutine marshal the output payload object.

Jump to

Keyboard shortcuts

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