disk

package
v0.0.0-...-077b43f Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2017 License: Apache-2.0 Imports: 19 Imported by: 3

Documentation

Overview

Package disk implements a disk-backend hinted handoff which uses raft for replication.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotOpen          = fmt.Errorf("service not open")
	ErrQueueNotOpen     = fmt.Errorf("queue not open")
	ErrQueueOpen        = fmt.Errorf("queue is open")
	ErrQueueFull        = fmt.Errorf("queue is full")
	ErrSegmentNotOpen   = fmt.Errorf("segment not open")
	ErrSegmentCorrupt   = fmt.Errorf("segment file corrupted")
	ErrSegmentFull      = fmt.Errorf("segment is full")
	ErrEOQ              = fmt.Errorf("end of queue")
	ErrCursorNotFound   = fmt.Errorf("cursor not found")
	ErrCursorOutOfRange = fmt.Errorf("cursor out of range")
	ErrHeadIsTail       = fmt.Errorf("head is tail")
)
View Source
var (
	DisableBufio = true
	Auditor      *log.Logger
)

Functions

func New

func New(cfg *Config) hh.Service

Types

type Config

type Config struct {
	Dirs          []string
	PurgeInterval time.Duration
	MaxAge        time.Duration
}

func DefaultConfig

func DefaultConfig() *Config

func (*Config) Validate

func (this *Config) Validate() error

type Service

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

func (*Service) Append

func (this *Service) Append(cluster, topic string, key, value []byte) error

func (*Service) AppendN

func (this *Service) AppendN() (n int64)

func (*Service) DeliverN

func (this *Service) DeliverN() (n int64)

func (*Service) Empty

func (this *Service) Empty(cluster, topic string) bool

func (*Service) FlushInflights

func (this *Service) FlushInflights()

func (*Service) Inflights

func (this *Service) Inflights() (n int64)

func (*Service) Name

func (this *Service) Name() string

func (*Service) ResetCounters

func (this *Service) ResetCounters()

func (*Service) Start

func (this *Service) Start() (err error)

func (*Service) Stop

func (this *Service) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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