cache

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const ROOT_FN = ".root-"

ROOT_FN ...

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Get(serverUuid string, databasename string) (*schema.Root, error)
	Set(root *schema.Root, serverUuid string, databasename string) error
}

Cache the cache interface

func NewFileCache

func NewFileCache(dir string) Cache

NewFileCache returns a new file cache

func NewInMemoryCache added in v0.7.0

func NewInMemoryCache() Cache

NewInMemoryCache returns a new in-memory cache

type HistoryCache

type HistoryCache interface {
	Cache
	Walk(serverID string, databasename string, f func(*schema.Root) interface{}) ([]interface{}, error)
}

HistoryCache the history cache interface

func NewHistoryFileCache

func NewHistoryFileCache(dir string) HistoryCache

NewHistoryFileCache returns a new history file cache

Jump to

Keyboard shortcuts

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