queue

package
v0.0.0-...-0751618 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Q_RECV string = "receiving"
	Q_SEND string = "sending"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PriorityQueue

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

func NewPriorityQueue

func NewPriorityQueue() *PriorityQueue

func (*PriorityQueue) Len

func (p *PriorityQueue) Len() int

func (*PriorityQueue) Less

func (p *PriorityQueue) Less(i, j int) bool

func (*PriorityQueue) Pop

func (p *PriorityQueue) Pop() interface{}

func (*PriorityQueue) Push

func (p *PriorityQueue) Push(qstore interface{})

func (*PriorityQueue) Swap

func (p *PriorityQueue) Swap(i, j int)

type Queue

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

type QueueBox

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

func NewQueuBox

func NewQueuBox(serviceConfig config.ServiceConfig) *QueueBox

func (*QueueBox) ReceiveMessage

func (q *QueueBox) ReceiveMessage(key string) ([]*email.MessageInfo, error)

func (*QueueBox) Start

func (q *QueueBox) Start() error

func (*QueueBox) Stop

func (q *QueueBox) Stop() error

type QueueFactory

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

func NewFactory

func NewFactory() *QueueFactory

func (*QueueFactory) GetOrCreate

func (q *QueueFactory) GetOrCreate(key string) QueueProcess

type QueueProcess

type QueueProcess interface {
	Len() int
	Less(i, j int) bool
	Push(qstore interface{})
	Pop() interface{}
	Swap(i, j int)
}

type QueueStore

type QueueStore struct {
	Message  interface{}
	Key      string
	Priority int
	Index    int
}

type QueueSubject

type QueueSubject string

Jump to

Keyboard shortcuts

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