Module libipld::store [−][src]
Expand description
Store traits.
Aliases
An alias is a named root of a dag. When a root is aliased, none of the leaves of the dag pointed to by the root will be collected by gc. However, a root being aliased does not mean that the dag must be complete.
Temporary pin
A temporary pin is an unnamed set of roots of a dag, that is just for the purpose of protecting blocks from gc while a large tree is constructed. While an alias maps a single name to a single root, a temporary alias can be assigned to an arbitrary number of blocks before the dag is finished.
Garbage collection (GC)
GC refers to the process of removing unaliased blocks. When it runs is implementation defined. However it is intended to run only when the configured size is exceeded at when it will start incrementally deleting unaliased blocks until the size target is no longer exceeded. It is implementation defined in which order unaliased blocks get removed.
Structs
DefaultParams | Default store parameters. |
Traits
Store | Implementable by ipld stores. An ipld store behaves like a cache. It will keep blocks until the cache is full after which it evicts blocks based on an eviction policy. If a block is aliased (recursive named pin), it and it’s recursive references will not be evicted or counted towards the cache size. |
StoreParams | The store parameters. |
Functions
dyn_alias | Creates a dynamic alias by appending a id. |