boltdb

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const AttrBlockSize = 100

AttrBlockSize is the size of attribute blocks for anti-entropy.

Variables

This section is empty.

Functions

func NewAttrStore

func NewAttrStore(path string) pilosa.AttrStore

NewAttrStore returns a new instance of AttrStore.

Types

type AttrCache

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

AttrCache represents a cache for attributes.

func NewAttrCache

func NewAttrCache() *AttrCache

NewAttrCache returns a new instance of AttrCache.

func (*AttrCache) Get

func (c *AttrCache) Get(id uint64) map[string]interface{}

Get returns the cached attributes for a given id.

func (*AttrCache) Set

func (c *AttrCache) Set(id uint64, attrs map[string]interface{})

Set updates the cached attributes for a given id.

type AttrStore

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

AttrStore represents a storage layer for attributes.

func (*AttrStore) Attrs

func (s *AttrStore) Attrs(id uint64) (m map[string]interface{}, err error)

Attrs returns a set of attributes by ID.

func (*AttrStore) BlockData

func (s *AttrStore) BlockData(i uint64) (map[uint64]map[string]interface{}, error)

BlockData returns all data for a single block.

func (*AttrStore) Blocks

func (s *AttrStore) Blocks() ([]pilosa.AttrBlock, error)

Blocks returns a list of all blocks in the store.

func (*AttrStore) Close

func (s *AttrStore) Close() error

Close closes the store.

func (*AttrStore) Open

func (s *AttrStore) Open() error

Open opens and initializes the store.

func (*AttrStore) Path

func (s *AttrStore) Path() string

Path returns path to the store's data file.

func (*AttrStore) SetAttrs

func (s *AttrStore) SetAttrs(id uint64, m map[string]interface{}) error

SetAttrs sets attribute values for a given ID.

func (*AttrStore) SetBulkAttrs

func (s *AttrStore) SetBulkAttrs(m map[uint64]map[string]interface{}) error

SetBulkAttrs sets attribute values for a set of ids.

Jump to

Keyboard shortcuts

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