cache

package
v0.19.4 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BOLT_HEAD_CACHE_BUCKET = []byte("head_cache")
View Source
var BOLT_HEAD_CACHE_KEY = []byte("head")
View Source
var BOLT_INDEX_CACHE_BUCKET = []byte("index_cache")
View Source
var BOLT_MEMORY_IMAGE_BUCKET = []byte("memory_image")
View Source
var BOLT_MEMORY_IMAGE_INDEX_KEY = []byte("current_index")
View Source
var BOLT_NAMESPACE_CACHE_BUCKET = []byte("namespace_cache")
View Source
var DATA_KEY = []byte("data")
View Source
var NANO_TIMESTAMP_KEY = []byte("nano_timestamp")
View Source
var TIMESTAMP_KEY = []byte("timestamp")

Functions

func MakeResidentBufferQueue

func MakeResidentBufferQueue(buffSize int) api.RequestPriorityQueue

func MakeResidentHeadCache

func MakeResidentHeadCache() api.HeadCache

func MakeResidentIndexCache

func MakeResidentIndexCache(buffSize int) api.IndexCache

func MakeResidentMemoryCache

func MakeResidentMemoryCache(indexBufferSize, namespaceBufferSize int) api.Cache

func MakeResidentMemoryImage

func MakeResidentMemoryImage() api.MemoryImage

MakeResidentMemoryImage makes an non-ACID api.MemoryImage implementation that is only suitable for tests.

func MakeResidentNamespaceCache

func MakeResidentNamespaceCache(buffSize int) api.NamespaceCache

Types

type BoltFactory

type BoltFactory struct {
	BoltOptions
}

func MakeBoltFactory added in v0.19.0

func MakeBoltFactory(options BoltOptions) (BoltFactory, error)

func (BoltFactory) MakeCache

func (factory BoltFactory) MakeCache() (api.Cache, error)

func (BoltFactory) MakeMemoryImage

func (factory BoltFactory) MakeMemoryImage() (api.MemoryImage, error)

type BoltOptions

type BoltOptions struct {
	DBOptions    *bolt.Options
	FilePath     string
	Mode         os.FileMode
	Db           *bolt.DB
	MaxCacheSize int
}

type Union added in v0.19.0

type Union struct {
	HeadCache      api.HeadCache
	IndexCache     api.IndexCache
	NamespaceCache api.NamespaceCache
}

func (Union) CloseCache added in v0.19.0

func (cache Union) CloseCache() error

func (Union) GetHead added in v0.19.0

func (cache Union) GetHead() (crdt.IPFSPath, error)

func (Union) GetIndex added in v0.19.0

func (cache Union) GetIndex(indexAddr crdt.IPFSPath) (crdt.Index, error)

func (Union) GetNamespace added in v0.19.0

func (cache Union) GetNamespace(namespaceAddr crdt.IPFSPath) (crdt.Namespace, error)

func (Union) SetHead added in v0.19.0

func (cache Union) SetHead(head crdt.IPFSPath) error

func (Union) SetIndex added in v0.19.0

func (cache Union) SetIndex(indexAddr crdt.IPFSPath, index crdt.Index) error

func (Union) SetNamespace added in v0.19.0

func (cache Union) SetNamespace(namespaceAddr crdt.IPFSPath, namespace crdt.Namespace) error

Jump to

Keyboard shortcuts

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