diskqueue

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrQueueFull = errors.New("error queue is full, can't create new membucket")

ErrQueueFull .

Functions

This section is empty.

Types

type DiskQueue

type DiskQueue interface {
	Push(p []byte) error
	Pop() ([]byte, error)
	Close() error
}

DiskQueue disk queue

func New

func New(fpath string, options ...Option) (DiskQueue, error)

New Ringbuffer

type Option

type Option func(opt *option)

Option Ringbuffer option

func SetBucketByte

func SetBucketByte(n int) Option

SetBucketByte bucketbyte

func SetDynamicMemBucket

func SetDynamicMemBucket(n int) Option

SetDynamicMemBucket set the number of dynamic mem bucket

func SetMaxBucket

func SetMaxBucket(n int) Option

SetMaxBucket set the number of max bucket 0 represent unlimit

func SetMemBucket

func SetMemBucket(n int) Option

SetMemBucket set the number of mem bucket

Jump to

Keyboard shortcuts

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