googlepubsub

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseProducer

func CloseProducer(producer interface{}) error

CloseProducer closes a given producer

func Produce

func Produce(jsonData json.RawMessage, producer interface{}, _ interface{}) (statusCode int, respStatus string, responseMessage string)

Types

type Config

type Config struct {
	Credentials     string              `json:"credentials"`
	ProjectId       string              `json:"projectId"`
	EventToTopicMap []map[string]string `json:"eventToTopicMap"`
	TestConfig      TestConfig          `json:"testConfig"`
}

type Opts

type Opts struct {
	Timeout time.Duration
}

type PubsubClient

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

func NewProducer

func NewProducer(destinationConfig interface{}, o Opts) (*PubsubClient, error)

NewProducer creates a producer based on destination config

type TestConfig

type TestConfig struct {
	Endpoint string `json:"endpoint"`
}

Jump to

Keyboard shortcuts

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