queueutil

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tokenise

func Tokenise(str string) string

Types

type QueueManager

type QueueManager interface {
	RegisterPublisher(ctx context.Context, opts *config.QueueOptions) error
	GetPublisher(ref string) (frame.Publisher, error)
	GetOrCreatePublisher(ctx context.Context, opts *config.QueueOptions) (frame.Publisher, error)
	DiscardPublisher(ctx context.Context, ref string) error

	Publish(ctx context.Context, reference string, payload any, headers ...map[string]string) error

	RegisterSubscriber(ctx context.Context, opts *config.QueueOptions, handler ...frame.SubscribeWorker) error
	GetSubscriber(ref string) (frame.Subscriber, error)
	GetOrCreateSubscriber(ctx context.Context, opts *config.QueueOptions) (frame.Subscriber, error)
	DiscardSubscriber(ctx context.Context, ref string) error
}

func NewQueueManager

func NewQueueManager(service *frame.Service) QueueManager

NewQueueManager ensures a default internal Queue exists

type WorkPoolManager added in v0.7.0

type WorkPoolManager[T any] interface {
	Submit(ctx context.Context, job frame.Job[T])
}

func NewWorkManager added in v0.7.0

func NewWorkManager[T any](service *frame.Service) WorkPoolManager[T]

NewWorkManager creates a new internal Queue worker

Jump to

Keyboard shortcuts

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