worker

package
v0.0.0-...-246a067 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SubscribeCounter = prometheus.NewCounter(prometheus.CounterOpts{
	Name: "subscriber_messages_received_total",
	Help: "Total number of received messages",
})

SubscribeCounter is a metrics counter for received messages.

Functions

This section is empty.

Types

type SubscribeWorker

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

SubscribeWorker is a worker to run pub/sub subscribers.

func NewSubscribeWorker

func NewSubscribeWorker(config *config.Config, client *pubsub.Client) *SubscribeWorker

NewSubscribeWorker returns a new SubscribeWorker.

func (*SubscribeWorker) Name

func (w *SubscribeWorker) Name() string

Name returns the worker name.

func (*SubscribeWorker) Run

func (w *SubscribeWorker) Run(ctx context.Context) error

Run executes the worker.

Jump to

Keyboard shortcuts

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