queue

package
v0.0.0-...-04fa1a7 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2018 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Mail-Queue backed by BoltDB

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fetch

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

func (*Fetch) Next

func (f *Fetch) Next() (key []byte, msg *qmodel.Message, err error)

type Queue

type Queue struct {
	DB *bolt.DB
}

func Open

func Open(name string) (*Queue, error)

func (*Queue) Close

func (q *Queue) Close() error

func (*Queue) Process

func (q *Queue) Process(f func(*Tx) error) error

type Tx

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

func (*Tx) Enqueue

func (tx *Tx) Enqueue(queue string, from string, to []string, r io.Reader) error

func (*Tx) EnqueueMessage

func (tx *Tx) EnqueueMessage(queue string, msg *qmodel.Message) error

func (*Tx) Fetch

func (tx *Tx) Fetch(queue string) *Fetch

func (*Tx) Peek

func (tx *Tx) Peek(queue string) (key []byte, msg *qmodel.Message, err error)

func (*Tx) ReEnqueueMessage

func (tx *Tx) ReEnqueueMessage(key []byte, queue string, msg *qmodel.Message) error

func (*Tx) Remove

func (tx *Tx) Remove(queue string, key []byte) error

func (*Tx) RemoveAll

func (tx *Tx) RemoveAll(queue string, keys [][]byte) error

Jump to

Keyboard shortcuts

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