storages

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dump

type Dump struct {
	Filename        string
	FlushFunc       func()
	Deserialize     func([]byte)
	OnFlushComplete func()
	FlushDelay      time.Duration
	IsFlushing      bool
	Logger          *zap.SugaredLogger
}

func NewDump

func NewDump(lg *zap.SugaredLogger, filename string, flushDelay time.Duration, flushFunc func(), onFlushComplete func()) *Dump

func (*Dump) Flush

func (d *Dump) Flush(version int64, data interface{})

func (*Dump) ForceFlush

func (d *Dump) ForceFlush()

func (*Dump) Recover

func (d *Dump) Recover(version *int64, dataDst interface{}) error

func (*Dump) StartFlushThread

func (d *Dump) StartFlushThread()

type WAL

type WAL struct {
	File     *os.File
	Filename string
	OnDecode func(reader io.Reader)
	Logger   *zap.SugaredLogger
}

func NewWAL

func NewWAL(lg *zap.SugaredLogger, filename string, onDecode func(io.Reader)) *WAL

func (*WAL) Recover

func (w *WAL) Recover()

func (*WAL) Recreate

func (w *WAL) Recreate()

func (*WAL) Write

func (w *WAL) Write(serializedEvent []byte)

Jump to

Keyboard shortcuts

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