Module directoryservice

Source

ModulesΒ§

bigtable πŸ”’
combinators πŸ”’
directory_graph πŸ”’
from_addr πŸ”’
grpc πŸ”’
memory πŸ”’
object_store πŸ”’
order_validator πŸ”’
redb πŸ”’
simple_putter πŸ”’
traverse πŸ”’
utils πŸ”’

StructsΒ§

BigtableDirectoryService
Provides a DirectoryService implementation using Bigtable as an underlying K/V store.
BigtableParameters
Represents configuration of BigtableDirectoryService. This currently conflates both connect parameters and data model/client behaviour parameters.
Cache
Asks near first, if not found, asks far. If found in there, returns it, and inserts it into near. Specifically, it always obtains the entire directory closure from far and inserts it into near, which is useful when far does not support accessing intermediate directories (but near does). There is no negative cache. Inserts and listings are not implemented for now.
CacheConfig
DirectoryGraph
This can be used to validate and/or re-order a Directory closure (DAG of connected Directories), and their insertion order.
GRPCDirectoryService
Connects to a (remote) snix-store DirectoryService over gRPC.
GRPCDirectoryServiceConfig
LeavesToRootValidator
Validates that newly uploaded directories only reference directories which have already been introduced. Commonly used when uploading a directory closure to a store.
MemoryDirectoryService
MemoryDirectoryServiceConfig
ObjectStoreDirectoryService
Stores directory closures in an object store. Notably, this makes use of the option to disallow accessing child directories except when fetching them recursively via the top-level directory, since all batched writes (using put_multiple_start) are stored in a single object. Directories are stored in a length-delimited format with a 1MiB limit. The length field is a u32 and the directories are stored in root-to-leaves topological order, the same way they will be returned to the client in get_recursive.
ObjectStoreDirectoryServiceConfig
RedbDirectoryService
RedbDirectoryServiceConfig
RootToLeavesValidator
Validates that newly introduced directories are already referenced from the root via existing directories. Commonly used when receiving a directory closure from a store.
SimplePutter
This is an implementation of DirectoryPutter that simply inserts individual Directory messages one by one, on close, after they successfully validated.
ValidatedDirectoryGraph

TraitsΒ§

DirectoryPutter
Provides a handle to put a closure of connected Directory elements.
DirectoryService
The base trait all Directory services need to implement. This is a simple get and put of Directory, returning their digest.
OrderValidator

FunctionsΒ§

descend_to
This descends from a (root) node to the given (sub)path, returning the Node at that path, or none, if there’s nothing at that path.
from_addr
Constructs a new instance of a DirectoryService from an URI.
register_directory_services πŸ”’
Registers the builtin DirectoryService implementations with the registry
traverse_directory
Traverses a Directory from the root to the children.