Module directoryservice

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 represents a full (and validated) graph of Directory nodes. It can be constructed using DirectoryGraphBuilder, and is normally used to convert from one order to the other. If you just want to validate an order without keeping the results, RootToLeavesValidator or LeavesToRootValidator can be used.
DirectoryGraphBuilder
This allows constructing a DirectoryGraph. After deciding on the insertion order (via Self::new_with_insertion_order), different Directory can be passed to Self::insert. A Self::build consumes the builder, returning a validated DirectoryGraph, or an error. The resulting DirectoryGraph can be used to drain the graph in either order.
GRPCDirectoryService
Connects to a (remote) snix-store DirectoryService over gRPC.
GRPCDirectoryServiceConfig
LeavesToRootValidator
A struct holding state while consuming a sequence of Directories in Leaves-To-Root order.
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
A struct holding state while consuming a sequence of Directories in Root-To-Leaves order.
SimplePutter
This is an implementation of DirectoryPutter that simply inserts individual Directory messages one by one, on close, after they successfully validated.

EnumsΒ§

DirectoryOrder
OrderingError
Emitted when directories are sent in the wrong order

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.

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.