Documentation ¶
Overview ¶
Package storage provides implementation contracts and notions used across storage-aware components in aurora.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Descriptor ¶
Descriptor holds information required for Pull syncing. This struct is provided by subscribing to pull index.
func (*Descriptor) String ¶
func (d *Descriptor) String() string
type ModeGet ¶
type ModeGet int
ModeGet enumerates different Getter modes.
const ( // ModeGetRequest: when accessed for retrieval ModeGetRequest ModeGet = iota // ModeGetSync: when accessed for syncing or proof of custody request ModeGetSync // ModeGetLookup: when accessed to lookup a a chunk in feeds or other places ModeGetLookup // ModeGetPin: used when a pinned chunk is accessed ModeGetPin ModeGetChain )
Getter modes.
type ModePut ¶
type ModePut int
ModePut enumerates different Putter modes.
const ( // ModePutRequest: when a chunk is received as a result of retrieve request and delivery ModePutRequest ModePut = iota // ModePutUpload: when a chunk is created by local upload ModePutUpload // ModePutUploadPin: the same as ModePutUpload but also pin the chunk atomically with the put ModePutUploadPin // ModePutRequestPin: the same as ModePutRequest but also pin the chunk with the put ModePutRequestPin ModePutChain )
Putter modes.
type ModeSet ¶
type ModeSet int
ModeSet enumerates different Setter modes.
const ( // ModeSetSync: when a push sync receipt is received for a chunk ModeSetSync ModeSet = iota // ModeSetRemove: when a chunk is removed ModeSetRemove // ModeSetPin: when a chunk is pinned during upload or separately ModeSetPin // ModeSetUnpin: when a chunk is unpinned using a command locally ModeSetUnpin )
Setter modes.
type StateIterFunc ¶
StateIterFunc is used when iterating through StateStorer key/value pairs
type StateStorer ¶
type StateStorer interface { Get(key string, i interface{}) (err error) Put(key string, i interface{}) (err error) Delete(key string) (err error) Iterate(prefix string, iterFunc StateIterFunc) (err error) // DB returns the underlying DB storage. DB() driver.BatchDB io.Closer }
StateStorer defines methods required to get, set, delete values for different keys and close the underlying resources.
Click to show internal directories.
Click to hide internal directories.