Documentation ¶
Index ¶
- func CheckDir(dir string) error
- func NewAWSStoreFactory(sess *session.Session, table, bucket string, indexCacheSize uint64) chunks.Factory
- func NewLocalStoreFactory(dir string, indexCacheSize uint64, maxTables int) chunks.Factory
- func ParseAddr(b []byte) (h addr)
- type AWSStoreFactory
- type EnumerationOrder
- type LocalStoreFactory
- type NomsBlockCache
- func (nbc *NomsBlockCache) Count() uint32
- func (nbc *NomsBlockCache) Destroy() error
- func (nbc *NomsBlockCache) ExtractChunks(order EnumerationOrder, chunkChan chan *chunks.Chunk)
- func (nbc *NomsBlockCache) Get(hash hash.Hash) chunks.Chunk
- func (nbc *NomsBlockCache) GetMany(hashes hash.HashSet, foundChunks chan *chunks.Chunk)
- func (nbc *NomsBlockCache) Has(hash hash.Hash) bool
- func (nbc *NomsBlockCache) Insert(c chunks.Chunk)
- type NomsBlockStore
- func (nbs *NomsBlockStore) AddHints(hints types.Hints)
- func (nbs *NomsBlockStore) CalcReads(hashes hash.HashSet, blockSize uint64) (reads int, split bool)
- func (nbs *NomsBlockStore) Close() (err error)
- func (nbs *NomsBlockStore) Count() uint32
- func (nbs *NomsBlockStore) Flush()
- func (nbs *NomsBlockStore) Get(h hash.Hash) chunks.Chunk
- func (nbs *NomsBlockStore) GetMany(hashes hash.HashSet, foundChunks chan *chunks.Chunk)
- func (nbs *NomsBlockStore) Has(h hash.Hash) bool
- func (nbs *NomsBlockStore) Put(c chunks.Chunk)
- func (nbs *NomsBlockStore) PutMany(chunx []chunks.Chunk)
- func (nbs *NomsBlockStore) Root() hash.Hash
- func (nbs *NomsBlockStore) SchedulePut(c chunks.Chunk, refHeight uint64, hints types.Hints)
- func (nbs *NomsBlockStore) UpdateRoot(current, last hash.Hash) bool
- func (nbs *NomsBlockStore) Version() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAWSStoreFactory ¶
func NewLocalStoreFactory ¶
Types ¶
type AWSStoreFactory ¶
type AWSStoreFactory struct {
// contains filtered or unexported fields
}
func (*AWSStoreFactory) CreateStore ¶
func (asf *AWSStoreFactory) CreateStore(ns string) chunks.ChunkStore
func (*AWSStoreFactory) Shutter ¶
func (asf *AWSStoreFactory) Shutter()
type EnumerationOrder ¶
type EnumerationOrder uint8
const ( // StorageVersion is the version of the on-disk Noms Chunks Store data format. StorageVersion = "2" InsertOrder EnumerationOrder = iota ReverseOrder )
type LocalStoreFactory ¶
type LocalStoreFactory struct {
// contains filtered or unexported fields
}
func (*LocalStoreFactory) CreateStore ¶
func (lsf *LocalStoreFactory) CreateStore(ns string) chunks.ChunkStore
func (*LocalStoreFactory) Shutter ¶
func (lsf *LocalStoreFactory) Shutter()
type NomsBlockCache ¶
type NomsBlockCache struct {
// contains filtered or unexported fields
}
NomsBlockCache holds Chunks, allowing them to be retrieved by hash or enumerated in hash order.
func NewCache ¶
func NewCache() *NomsBlockCache
func (*NomsBlockCache) Count ¶
func (nbc *NomsBlockCache) Count() uint32
Count returns the number of items in the cache.
func (*NomsBlockCache) Destroy ¶
func (nbc *NomsBlockCache) Destroy() error
Destroy drops the cache and deletes any backing storage.
func (*NomsBlockCache) ExtractChunks ¶
func (nbc *NomsBlockCache) ExtractChunks(order EnumerationOrder, chunkChan chan *chunks.Chunk)
ExtractChunks writes the entire contents of the cache to chunkChan. The chunks are extracted in insertion order.
func (*NomsBlockCache) Get ¶
func (nbc *NomsBlockCache) Get(hash hash.Hash) chunks.Chunk
Get retrieves the chunk referenced by hash. If the chunk is not present, Get returns the empty Chunk.
func (*NomsBlockCache) GetMany ¶
func (nbc *NomsBlockCache) GetMany(hashes hash.HashSet, foundChunks chan *chunks.Chunk)
GetMany gets the Chunks with |hashes| from the store. On return, |foundChunks| will have been fully sent all chunks which have been found. Any non-present chunks will silently be ignored.
func (*NomsBlockCache) Has ¶
func (nbc *NomsBlockCache) Has(hash hash.Hash) bool
Has checks if the chunk referenced by hash is in the cache.
func (*NomsBlockCache) Insert ¶
func (nbc *NomsBlockCache) Insert(c chunks.Chunk)
Insert stores c in the cache.
type NomsBlockStore ¶
type NomsBlockStore struct {
// contains filtered or unexported fields
}
func NewAWSStore ¶
func NewAWSStore(table, ns, bucket string, s3 s3svc, ddb ddbsvc, memTableSize uint64) *NomsBlockStore
func NewLocalStore ¶
func NewLocalStore(dir string, memTableSize uint64) *NomsBlockStore
func (*NomsBlockStore) AddHints ¶
func (nbs *NomsBlockStore) AddHints(hints types.Hints)
types.BatchStore
func (*NomsBlockStore) Close ¶
func (nbs *NomsBlockStore) Close() (err error)
func (*NomsBlockStore) Count ¶
func (nbs *NomsBlockStore) Count() uint32
func (*NomsBlockStore) Flush ¶
func (nbs *NomsBlockStore) Flush()
func (*NomsBlockStore) GetMany ¶
func (nbs *NomsBlockStore) GetMany(hashes hash.HashSet, foundChunks chan *chunks.Chunk)
func (*NomsBlockStore) Put ¶
func (nbs *NomsBlockStore) Put(c chunks.Chunk)
func (*NomsBlockStore) PutMany ¶
func (nbs *NomsBlockStore) PutMany(chunx []chunks.Chunk)
func (*NomsBlockStore) Root ¶
func (nbs *NomsBlockStore) Root() hash.Hash
func (*NomsBlockStore) SchedulePut ¶
func (*NomsBlockStore) UpdateRoot ¶
func (nbs *NomsBlockStore) UpdateRoot(current, last hash.Hash) bool
func (*NomsBlockStore) Version ¶
func (nbs *NomsBlockStore) Version() string