queue

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegQueueCreator

func RegQueueCreator(typeName string, creator QueueCreatorFunc)

Types

type NatsQueueClient added in v0.1.15

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

func (*NatsQueueClient) Consume added in v0.1.15

func (o *NatsQueueClient) Consume(name string, consumer QueueConsumerFunc)

func (*NatsQueueClient) Publish added in v0.1.15

func (o *NatsQueueClient) Publish(name string, payload interface{}) error

type QueueClient

type QueueClient interface {
	Publish(name string, payload interface{}) error
	Consume(name string, consumer QueueConsumerFunc)
}

func Get

func Get(name ...string) QueueClient

type QueueConsumerFunc

type QueueConsumerFunc func(name, payload string)

type QueueCreatorFunc

type QueueCreatorFunc func(url string) (QueueClient, error)

type RedisQueue

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

func (*RedisQueue) Consume

func (o *RedisQueue) Consume(name string, consumer QueueConsumerFunc)

func (*RedisQueue) Publish

func (o *RedisQueue) Publish(name string, payload interface{}) error

Jump to

Keyboard shortcuts

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