bbolt

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltQueueService

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

BoltQueueService implements QueueEngineInterface using Watermill Bolt Pub/Sub

func GetBoltQueueDriver

func GetBoltQueueDriver(cfg *models.Config) (*BoltQueueService, error)

func (*BoltQueueService) AddSubscriber

func (s *BoltQueueService) AddSubscriber(ctx context.Context, userID string) (*models.Subscriber, error)

AddSubscriber method adds a subscriber to the Pub/Sub service and returns a pointer to the Subscriber object and an error if the operation fails.

func (*BoltQueueService) Close

func (r *BoltQueueService) Close() error

Close implements QueueEngineInterface.Close

func (*BoltQueueService) GetSubscriber

func (s *BoltQueueService) GetSubscriber(ctx context.Context, userID string) (*models.Subscriber, error)

GetSubscriber method retrieves a subscriber from the Pub/Sub service and returns a pointer to the Subscriber object and an error if the operation fails.

func (*BoltQueueService) Publish

func (r *BoltQueueService) Publish(topic string, messages ...*message.Message) error

Publish implements message.Publisher interface

func (*BoltQueueService) RemoveSubscriber

func (s *BoltQueueService) RemoveSubscriber(ctx context.Context, userID string) error

RemoveSubscriber method removes a subscriber from the Pub/Sub service and returns an error if the operation fails.

func (*BoltQueueService) Subscribe

func (r *BoltQueueService) Subscribe(ctx context.Context, topic string) (<-chan *message.Message, error)

Subscribe implements message.Subscriber interface

Jump to

Keyboard shortcuts

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