queue

package
v0.0.0-...-36d655e Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StorageKeyWord   string = "DazQueueKey"
	ErrTopicNotExist string = "topic not exist"
	ErrLineNotExist  string = "line not exist"
	ErrTopicExist    string = "topic already exist"
	ErrLineExist     string = "line already exist"
	ErrKey           string = "key illegal"
	ErrNone          string = "no message"
)

Variables

This section is empty.

Functions

func NewLine

func NewLine(name string, recycle time.Duration) *line

func NewTopic

func NewTopic(name string) *topic

Types

type DazQueue

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

func NewDazQueue

func NewDazQueue(storage store.Storage) (*DazQueue, error)

func (*DazQueue) Close

func (d *DazQueue) Close()

func (*DazQueue) Create

func (d *DazQueue) Create(name string) error

func (*DazQueue) CreateTopic

func (d *DazQueue) CreateTopic(name string) error

func (*DazQueue) Pop

func (d *DazQueue) Pop(name string) ([]byte, error)

func (*DazQueue) Push

func (d *DazQueue) Push(name string, data []byte) error

type DazQueueStore

type DazQueueStore struct {
	Topics []string
}

type MessageQueue

type MessageQueue interface {
	Create(name string) error
	Push(name string, data []byte) error
	Pop(name string) ([]byte, error)
	Close()
}

Jump to

Keyboard shortcuts

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