bus

package
v0.0.0-...-b630d9d Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSClient

type AWSClient struct {
	// AWS project ID
	ProjectID string
	// AWS region
	Region   string
	Session  *session.Session
	Instance *sns.SNS
}

AWSClient defines the client to communicate with the SNS.

func (*AWSClient) Connect

func (c *AWSClient) Connect() error

Connect establishes connector to the message broker.

func (*AWSClient) Push

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

Push pushes the message to a topic.

type GCPClient

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

GCPClient defines the client to communicate with pubsub.

func (*GCPClient) Connect

func (c *GCPClient) Connect() error

Connect establishes connector to the message broker.

func (*GCPClient) Push

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

Push pushes the message to a topic.

Jump to

Keyboard shortcuts

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