queue

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assign

func Assign(queueName string, prefetchLimit int64, duration time.Duration, f Func, pushQueueFunc ...Func)

func AssignBatch

func AssignBatch(queueName string, prefetchLimit int64, duration time.Duration, batchSize int64, timeout time.Duration, f FuncBatch, pushQueueFunc ...Func)

func Bind

func Bind(conf ...Conf)

func Publish

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

func Purge

func Purge(queueName string, qt KeyFlag) error

func Return

func Return(queueName string, qt KeyFlag, max int64) error

func StopAllConsuming

func StopAllConsuming() error

func StopConsuming

func StopConsuming(queueName string) error

Types

type AssignFunc

type AssignFunc func() error

type BatchConsumerFunc

type BatchConsumerFunc func(deliveries rmq.Deliveries)

func (BatchConsumerFunc) Consume

func (batchConsumerFunc BatchConsumerFunc) Consume(delivery rmq.Deliveries)

type Conf

type Conf func(*RedisMessageConn)

func CleanerTick

func CleanerTick(duration time.Duration) Conf

func Custom

func Custom(custom interface{}) Conf

func Mongo

func Mongo(mg *mongo.MgoClient) Conf

func Name

func Name(name string) Conf

func Redis

func Redis(rd *redis.RdClient) Conf

func Repo

func Repo(rp *repo.Repository) Conf

type Configuration

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

func (*Configuration) CleanerTick

func (c *Configuration) CleanerTick() time.Duration

func (*Configuration) Custom

func (c *Configuration) Custom() interface{}

func (*Configuration) Mongo

func (c *Configuration) Mongo() *mongo.MgoClient

func (*Configuration) Redis

func (c *Configuration) Redis() *redis.RdClient

func (*Configuration) Repo

func (c *Configuration) Repo() *repo.Repository

type Deliveries

type Deliveries = rmq.Deliveries

type Delivery

type Delivery = rmq.Delivery

type Func

type Func func(Delivery, *Configuration)

type FuncBatch

type FuncBatch func(Deliveries, *Configuration)

type KeyFlag

type KeyFlag int
const (
	Rejected KeyFlag = iota
	Ready
	Unacked
)

type RedisMessageConn

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

Jump to

Keyboard shortcuts

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