pubsub

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opt

type Opt func(*Publisher)

func WithByteThreshold

func WithByteThreshold(bytes int) Opt

func WithCountThreshold

func WithCountThreshold(count int) Opt

func WithDelayThreshold

func WithDelayThreshold(duration time.Duration) Opt

func WithTimeout

func WithTimeout(timeout time.Duration) Opt

func WithTopicAutocreate

func WithTopicAutocreate(autocreate bool) Opt

func WithTopicFormat

func WithTopicFormat(format string) Opt

func WithTopicRetention

func WithTopicRetention(duration time.Duration) Opt

type Publisher

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

Publisher publishes to a Google Cloud Platform PubSub Topic.

func New

func New(client *pubsub.Client, opts ...Opt) (*Publisher, error)

NewPubSub creates a new PubSub publisher

func (*Publisher) Close

func (p *Publisher) Close() error

func (*Publisher) Name

func (p *Publisher) Name() string

func (*Publisher) ProduceBulk

func (p *Publisher) ProduceBulk(events []*pb.Event, connGroup string) error

Jump to

Keyboard shortcuts

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