{"modulePath":"github.com/apito-io/engine","version":"v1.6.7","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package memory\n\n## Types\n\n```go\ntype MemoryQueueService struct {\n\t// contains filtered or unexported fields\n}\n```\nMemoryQueueService implements QueueEngineInterface using Watermill GoChannel Pub/Sub\n\n```go\nfunc GetMemoryQueueDriver(cfg *models.Config) (*MemoryQueueService, error)\n```\n\n```go\nfunc (m *MemoryQueueService) AddSubscriber(ctx context.Context, userID string) (*models.Subscriber, error)\n```\nAddSubscriber method adds a subscriber to the Pub/Sub service and returns a pointer to the Subscriber object and an error if the operation fails.\n\n```go\nfunc (m *MemoryQueueService) Close() error\n```\nClose implements QueueEngineInterface.Close\n\n```go\nfunc (m *MemoryQueueService) GetSubscriber(ctx context.Context, userID string) (*models.Subscriber, error)\n```\nGetSubscriber method retrieves a subscriber from the Pub/Sub service and returns a pointer to the Subscriber object and an error if the operation fails.\n\n```go\nfunc (m *MemoryQueueService) Publish(topic string, messages ...*message.Message) error\n```\nPublish implements message.Publisher interface\n\n```go\nfunc (m *MemoryQueueService) RemoveSubscriber(ctx context.Context, userID string) error\n```\nRemoveSubscriber method removes a subscriber from the Pub/Sub service and returns an error if the operation fails.\n\n```go\nfunc (m *MemoryQueueService) Subscribe(ctx context.Context, topic string) (\u003c-chan *message.Message, error)\n```\nSubscribe implements message.Subscriber interface\n\n","path":"github.com/apito-io/engine/database/queue/memory","name":"memory","synopsis":"","isRedistributable":true}
