cloudpubsub

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ClientOpts          []option.ClientOption
	PublishSettingsFunc func(*pubsub.PublishSettings)
	TopicConfig         *pubsub.TopicConfigToUpdate
	CreateTopic         bool
	DeleteTopic         bool
}

Config represents publisher configuration.

type Driver

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

func CreateDriver

func CreateDriver(ctx context.Context, projectID, topicID string, opts ...Option) (*Driver, error)

func (*Driver) Close

func (d *Driver) Close(ctx context.Context) error

func (*Driver) Flush

func (d *Driver) Flush()

func (*Driver) Publish

func (d *Driver) Publish(ctx context.Context, msg *pubee.Message) <-chan error

type Option

type Option func(*Config)

Option is publisher Option

func WithClientOptions

func WithClientOptions(opts ...option.ClientOption) Option

WithClientOptions returns an Option that set option.ClientOption implementation(s).

func WithCreateTopicIfNeeded

func WithCreateTopicIfNeeded() Option

func WithDeleteTopicOnClose

func WithDeleteTopicOnClose() Option

func WithPublishSettings

func WithPublishSettings(f func(*pubsub.PublishSettings)) Option

WithPublishSettings returns an Option that set pubsub.PublishSettings to the pubsub.Topic.

func WithUpdateTopicConfig

func WithUpdateTopicConfig(cfg pubsub.TopicConfigToUpdate) Option

WithUpdateTopicConfig returns an Option that update configuration for pubsub.Topic.

Jump to

Keyboard shortcuts

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