diskqueue

package
v1.0.40 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrExited = errors.New("diskqueue has been exited")
)

Functions

This section is empty.

Types

type DiskQueue

type DiskQueue interface {
	Len() int64
	Push([]byte) error
	Pop() chan []byte
	Clear() error
	Close() error
	DeleteAndExit() error
}

func NewDiskQueue

func NewDiskQueue(opts ...Option) (DiskQueue, error)

type Option

type Option func(*diskQueue)

func WithDataPath

func WithDataPath(dataPath string) Option

func WithMaxBytesPerFile

func WithMaxBytesPerFile(max int64) Option

func WithMaxMsgSize

func WithMaxMsgSize(size int32) Option

func WithMinMsgSize

func WithMinMsgSize(size int32) Option

func WithName

func WithName(name string) Option

func WithSyncEvery

func WithSyncEvery(count int64) Option

func WithSyncTimeout

func WithSyncTimeout(timeout time.Duration) Option

Jump to

Keyboard shortcuts

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