flusher

package
v1.9.13-beta3 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flushable

type Flushable interface {
	FlushDirty() error
}

Flushable is implemented by any store that can flush dirty records to disk.

type Flusher

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

Flusher periodically flushes dirty records from all registered stores to disk.

func NewFlusher

func NewFlusher(interval time.Duration) *Flusher

NewFlusher creates a new Flusher that flushes at the given interval.

func (*Flusher) AddStore

func (f *Flusher) AddStore(s Flushable)

AddStore registers a store to be flushed periodically.

func (*Flusher) Start

func (f *Flusher) Start()

Start begins the background flush loop.

func (*Flusher) Stop

func (f *Flusher) Stop()

Stop signals the flusher to perform a final flush and stop. Blocks until the flush loop has exited.

Jump to

Keyboard shortcuts

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