diskqueue

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2021 License: MIT Imports: 13 Imported by: 1

README

diskqueue

Build Status GitHub

diskqueue forked from NSQ.io

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiskQueue

type DiskQueue interface {
	Put([]byte) error
	ReadChan() chan []byte // this is expected to be an *unbuffered* channel
	Close() error
	Delete() error
	Depth() int64
	Empty() error
}

DiskQueue interface for disk queue

func New

func New(opts Options) DiskQueue

New instantiates an instance of diskQueue, retrieving metadata from the filesystem and starting the read ahead goroutine

type Options added in v1.1.0

type Options struct {
	Name            string
	DataPath        string
	MaxBytesPerFile int64
	MinMsgSize      int32
	MaxMsgSize      int32
	SyncEvery       int64
	SyncTimeout     time.Duration
	Logger          sugar.Logger
}

Options disk queue options

Source Files

  • diskqueue.go

Jump to

Keyboard shortcuts

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