puller

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	ID         string
	Data       []byte
	Attributes map[string]string

	Ack  func()
	Nack func()
}

type Option

type Option func(*options)

func WithLogger

func WithLogger(logger *zap.Logger) Option

type Puller

type Puller interface {
	Pull(context.Context, func(context.Context, *Message)) error
	SubscriptionName() string
}

func NewPuller

func NewPuller(sub *pubsub.Subscription, opts ...Option) Puller

type RateLimitedPuller

type RateLimitedPuller interface {
	Run(context.Context) error
	MessageCh() <-chan *Message
	SubscriptionName() string
}

func NewRateLimitedPuller

func NewRateLimitedPuller(puller Puller, maxMPS int) RateLimitedPuller

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