push

package
v0.0.0-...-de41a1e Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockWorker

type MockWorker struct {
	Sub       amsPb.Subscription
	SubStatus string
	// contains filtered or unexported fields
}

MockWorker is to be used as a dummy worker when we want the push actual worker functionality

func (*MockWorker) Consumer

func (w *MockWorker) Consumer() consumers.Consumer

func (*MockWorker) Start

func (w *MockWorker) Start()

func (*MockWorker) Status

func (w *MockWorker) Status() string

func (*MockWorker) Stop

func (w *MockWorker) Stop()

func (*MockWorker) Subscription

func (w *MockWorker) Subscription() *amsPb.Subscription

type PushError

type PushError struct {
	ErrMsg  string
	SubName string
}

type Worker

type Worker interface {
	// Start starts the the push functionality based on the type of the worker
	Start()
	// Stop cancels the push functionality
	Stop()
	// Subscription returns the currently active subscription that is being handled by the worker
	Subscription() *amsPb.Subscription
	// Consumer returns the consumer that the worker is using
	Consumer() consumers.Consumer
	// Status returns the status of the worker
	Status() string
}

Worker encapsulates the flow of consuming, sending and acknowledging

func New

New acts as a worker factory, creates and returns a new worker based on the provided type

type WorkerStatus

type WorkerStatus string

Jump to

Keyboard shortcuts

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