internal

package
v0.7.9 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TopicID

func TopicID(name TopicName) string

TopicID ...

Types

type Client

type Client interface {
	Topic(topicID string) Topic
	Pub(ctx context.Context, topicID string, evt event.Event) error
	Sub(ctx context.Context, topicID string, handler Handler, opts ...SubscriptionOpt) error
	Close()
}

Client ...

func NewClient

func NewClient(ctx context.Context, projectID, svcID, envID, adcCredPath string) (Client, error)

NewClient ...

func NewWithPubSubClient added in v0.6.3

func NewWithPubSubClient(cli *pubsub.Client, projectID, svcID, envID string) Client

NewWithPubSubClient ...

type Config

type Config interface {
	Project() string
	Service() string
	EnvID() string
	CredPath() string
}

Config ...

func NewConfig

func NewConfig() Config

NewConfig ...

type Handler

type Handler func(ctx context.Context, evt event.Event) error

Handler ...

type SubscriptionOpt

type SubscriptionOpt func(*pubsub.ReceiveSettings)

SubscriptionOpt ...

type Topic

type Topic interface {
	Pub(ctx context.Context, evt event.Event) error
	Sub(ctx context.Context, handler Handler, opts ...SubscriptionOpt) error
}

Topic ...

type TopicName

type TopicName string

TopicName ...

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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