Versions in this module Expand all Collapse all v1 v1.2.1 Oct 17, 2017 v1.2.0 Jul 27, 2017 v1.1.0 Mar 23, 2017 v1.0.3 Mar 3, 2017 v1.0.2 Dec 20, 2016 Changes in this version + var ZeroKey = Key(common.Hash{}.Bytes()) + func BytesToU64(data []byte) uint64 + func IsZeroKey(key Key) bool + func NewDpaChunkStore(localStore, netStore ChunkStore) *dpaChunkStore + func U64ToBytes(val uint64) []byte + type Chunk struct + C chan bool + Key Key + Req *RequestStatus + SData []byte + Size int64 + Source Peer + func NewChunk(key Key, rs *RequestStatus) *Chunk + func (self *Chunk) String() string + type ChunkStore interface + Get func(Key) (*Chunk, error) + Put func(*Chunk) + type Chunker interface + type ChunkerParams struct + Branches int64 + Hash string + func NewChunkerParams() *ChunkerParams + type CloudStore interface + Deliver func(*Chunk) + Retrieve func(*Chunk) + Store func(*Chunk) + type DPA struct + Chunker Chunker + func NewDPA(store ChunkStore, params *ChunkerParams) *DPA + func NewLocalDPA(datadir string) (*DPA, error) + func (self *DPA) Retrieve(key Key) LazySectionReader + func (self *DPA) Start() + func (self *DPA) Stop() + func (self *DPA) Store(data io.Reader, size int64, swg *sync.WaitGroup, wwg *sync.WaitGroup) (key Key, err error) + type DbStore struct + func NewDbStore(path string, hash Hasher, capacity uint64, radius int) (s *DbStore, err error) + func (s *DbStore) Counter() uint64 + func (s *DbStore) Get(key Key) (chunk *Chunk, err error) + func (s *DbStore) Put(chunk *Chunk) + func (self *DbStore) NewSyncIterator(state DbSyncState) (si *dbSyncIterator, err error) + type DbSyncState struct + First uint64 + Last uint64 + Start Key + Stop Key + type Hasher func() hash.Hash + func MakeHashFunc(hash string) Hasher + type Joiner interface + Join func(key Key, chunkC chan *Chunk) LazySectionReader + type Key []byte + func (key *Key) UnmarshalJSON(value []byte) error + func (key Key) Hex() string + func (key Key) Log() string + func (key Key) MarshalJSON() (out []byte, err error) + func (key Key) String() string + func (x Key) Size() uint + type LDBDatabase struct + func NewLDBDatabase(file string) (*LDBDatabase, error) + func (self *LDBDatabase) Close() + func (self *LDBDatabase) Delete(key []byte) error + func (self *LDBDatabase) Get(key []byte) ([]byte, error) + func (self *LDBDatabase) LastKnownTD() []byte + func (self *LDBDatabase) NewIterator() iterator.Iterator + func (self *LDBDatabase) Put(key []byte, value []byte) + func (self *LDBDatabase) Write(batch *leveldb.Batch) error + type LazyChunkReader struct + func (s *LazyChunkReader) Seek(offset int64, whence int) (int64, error) + func (self *LazyChunkReader) Read(b []byte) (read int, err error) + func (self *LazyChunkReader) ReadAt(b []byte, off int64) (read int, err error) + func (self *LazyChunkReader) Size(quitC chan bool) (n int64, err error) + type LazySectionReader interface + Size func(chan bool) (int64, error) + type LazyTestSectionReader struct + func (self *LazyTestSectionReader) Size(chan bool) (int64, error) + type LocalStore struct + DbStore ChunkStore + func NewLocalStore(hash Hasher, params *StoreParams) (*LocalStore, error) + func (self *LocalStore) Get(key Key) (chunk *Chunk, err error) + func (self *LocalStore) Put(chunk *Chunk) + type MemStore struct + func NewMemStore(d *DbStore, capacity uint) (m *MemStore) + func (s *MemStore) Get(hash Key) (chunk *Chunk, err error) + func (s *MemStore) Put(entry *Chunk) + type NetStore struct + func NewNetStore(hash Hasher, lstore *LocalStore, cloud CloudStore, params *StoreParams) *NetStore + func (self *NetStore) Get(key Key) (*Chunk, error) + func (self *NetStore) Put(entry *Chunk) + type Node struct + Children []common.Hash + Last bool + Pending int64 + Size uint64 + func (self *Node) String() string + type Peer interface + type PyramidChunker struct + func NewPyramidChunker(params *ChunkerParams) (self *PyramidChunker) + func (self *PyramidChunker) Split(data io.Reader, size int64, chunkC chan *Chunk, swg, wwg *sync.WaitGroup) (Key, error) + type RequestStatus struct + C chan bool + Key Key + Requesters map[uint64][]interface{} + Source Peer + type Splitter interface + Split func(io.Reader, int64, chan *Chunk, *sync.WaitGroup, *sync.WaitGroup) (Key, error) + type StoreParams struct + CacheCapacity uint + ChunkDbPath string + DbCapacity uint64 + Radius int + func NewStoreParams(path string) (self *StoreParams) + type Task struct + Data []byte + Index int64 + Last bool + Size uint64 + type Tree struct + Chunks int64 + Levels []map[int64]*Node + Lock sync.RWMutex + type TreeChunker struct + func NewTreeChunker(params *ChunkerParams) (self *TreeChunker) + func (self *TreeChunker) Join(key Key, chunkC chan *Chunk) LazySectionReader + func (self *TreeChunker) Split(data io.Reader, size int64, chunkC chan *Chunk, swg, wwg *sync.WaitGroup) (Key, error) Incompatible versions in this module v2.2.1+incompatible Jan 16, 2019 v2.2.0+incompatible Dec 12, 2018 v2.1.1+incompatible Oct 16, 2018 v2.1.0+incompatible Aug 23, 2018 v2.0.2+incompatible Mar 1, 2018 v2.0.1+incompatible Feb 21, 2018 v2.0.1-pre+incompatible Feb 8, 2018 v2.0.0+incompatible Nov 16, 2017