publisher

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBadMessage = errors.New("publisher: bad message")
)

Functions

This section is empty.

Types

type Message

type Message interface {
	GetId() string
	protoiface.MessageV1
}

type Option

type Option func(*options)

func WithLogger

func WithLogger(logger *zap.Logger) Option

func WithMetrics

func WithMetrics(registerer metrics.Registerer) Option

type Publisher

type Publisher interface {
	Publish(ctx context.Context, msg Message) error
	PublishMulti(ctx context.Context, messages []Message) map[string]error
	Stop()
}

func NewPublisher

func NewPublisher(topic *pubsub.Topic, opts ...Option) Publisher

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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