walcache

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2017 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WALCache

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

WALCache is a read-through cache to:

a) provide a reentrant interface b) deduplicate requests (i.e. no thundering-herd for the same WAL file) c) deliberately intollerant of scans because we know the input is monotonic d) sized to include only the walReadAhead

func New

func New(ctx context.Context, cfg *config.Config, metrics *cgm.CirconusMetrics, ioCache *iocache.IOCache) (*WALCache, error)

func (*WALCache) Get

func (wc *WALCache) Get(k interface{}) (interface{}, error)

Get forwards to gcache.Cache's Get().

func (*WALCache) GetIFPresent

func (wc *WALCache) GetIFPresent(k interface{}) (interface{}, error)

GetIFPresent forwards to gcache.Cache's GetIFPresent().

func (*WALCache) Purge

func (wc *WALCache) Purge()

Purge purges the WALCache of its cache (and all downstream caches)

func (*WALCache) ReadAhead

func (wc *WALCache) ReadAhead() uint32

ReadAhead returns the number of WAL files to read ahead of PostgreSQL.

func (*WALCache) Wait

func (wc *WALCache) Wait()

Wait blocks until the WALCache finishes shutting down its workers (including the workers of its IOCache).

Jump to

Keyboard shortcuts

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