memory

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryQueueService

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

MemoryQueueService implements QueueEngineInterface using Watermill GoChannel Pub/Sub

func GetMemoryQueueDriver

func GetMemoryQueueDriver(cfg *models.Config) (*MemoryQueueService, error)

func (*MemoryQueueService) AddSubscriber

func (m *MemoryQueueService) 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 (*MemoryQueueService) Close

func (m *MemoryQueueService) Close() error

Close implements QueueEngineInterface.Close

func (*MemoryQueueService) GetSubscriber

func (m *MemoryQueueService) 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 (*MemoryQueueService) Publish

func (m *MemoryQueueService) Publish(topic string, messages ...*message.Message) error

Publish implements message.Publisher interface

func (*MemoryQueueService) RemoveSubscriber

func (m *MemoryQueueService) 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 (*MemoryQueueService) Subscribe

func (m *MemoryQueueService) 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