queue

package
v0.0.0-...-e6c7ec5 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFileClosed = errors.New("file closed")

Functions

This section is empty.

Types

type File

type File struct {
	*os.File
	// contains filtered or unexported fields
}

func CreateFile

func CreateFile(dirs []string, topic string, baseID int64, maxEntries int64) (*File, error)

func OpenFile

func OpenFile(dirs []string, topic string, baseID int64) (*File, error)

func (*File) Close

func (f *File) Close() error

func (*File) ReadMeta

func (f *File) ReadMeta(id int64, limit int64) (Meta, error)

func (*File) WriteMessages

func (f *File) WriteMessages(timestamp uint64, sizes []int64, r io.Reader) (int, error)

type Meta

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

type Queue

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

func NewQueue

func NewQueue(dirs []string, cache bool, maxEntriesPerFile int64) (*Queue, error)

func (*Queue) ClearCache

func (q *Queue) ClearCache() error

func (*Queue) Close

func (q *Queue) Close() error

func (*Queue) Consume

func (q *Queue) Consume(group, topic string, id int64, limit int64, w http.ResponseWriter) (int, error)

func (*Queue) CreateTopic

func (q *Queue) CreateTopic(topic string) error

func (*Queue) DeleteTopic

func (q *Queue) DeleteTopic(topic string) error

func (*Queue) ListTopics

func (q *Queue) ListTopics(regex *regexp.Regexp) ([]string, error)

func (*Queue) ModifyTopic

func (q *Queue) ModifyTopic(topic string, request headers.ModifyRequest) (*headers.TopicInfo, error)

func (*Queue) Produce

func (q *Queue) Produce(topic string, msgSizes []int64, timestamp uint64, r io.Reader) error

func (*Queue) RootDir

func (q *Queue) RootDir() string

func (*Queue) WatchTopics

func (q *Queue) WatchTopics(topics []string) (written, deleted chan string, closer io.Closer, err error)

Jump to

Keyboard shortcuts

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