pubsub

package
v1.15.5 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SQS    = "sqs"
	SNS    = "sns"
	KAFKA  = "kafka"
	NATS   = "nats"
	PUBSUB = "pubsub"
)

Queue types

Variables

This section is empty.

Functions

func ConfigAdd

func ConfigAdd(path string)

func NewSubscription

func NewSubscription(ctx context.Context) (*pubsub.Subscription, error)

NewSubscription creates a subscription.

func NewSubscriptionWithConfigPath

func NewSubscriptionWithConfigPath(ctx context.Context, path string) (*pubsub.Subscription, error)

NewSubscriptionWithConfigPath return a subscription with options from config path.

func NewSubscriptionWithOptions

func NewSubscriptionWithOptions(ctx context.Context, o *Options) (*pubsub.Subscription, error)

NewSubscriptionWithOptions return a subscription with options from config path.

func NewTopic

func NewTopic(ctx context.Context) (*pubsub.Topic, error)

NewTopic creates a topic publisher

func NewTopicWithConfigPath

func NewTopicWithConfigPath(ctx context.Context, path string) (*pubsub.Topic, error)

NewTopicWithConfigPath start a new topic for sending messages with options from config path.

func NewTopicWithOptions

func NewTopicWithOptions(ctx context.Context, o *Options) (*pubsub.Topic, error)

NewTopicWithOptions start a new topic for sending messages.

Types

type Options

type Options struct {
	Resource string
	Type     string
	Region   string
}

Options represents pubsub client options.

func NewOptions

func NewOptions() (*Options, error)

NewOptions returns options from config file or environment vars.

func NewOptionsWithPath

func NewOptionsWithPath(path string) (opts *Options, err error)

NewOptionsWithPath unmarshals a given key path into options and returns it.

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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