Module directoryservice

Module directoryservice 

Source

Modulesยง

bigtable ๐Ÿ”’ cloud
combinators ๐Ÿ”’
directory_graph ๐Ÿ”’
from_addr ๐Ÿ”’
grpc ๐Ÿ”’
object_store ๐Ÿ”’
order_validator ๐Ÿ”’
redb ๐Ÿ”’
simple_putter ๐Ÿ”’
traversal

Structsยง

BigtableDirectoryServicecloud
Provides a DirectoryService implementation using Bigtable as an underlying K/V store.
BigtableParameterscloud
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 receive in one or the other insertion order, validate, and then drain in Leaves-To-Root order. 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 (Self::new_leaves_to_root or Self::new_root_to_leaves with the expected root digest passed), different Directory can be passed to Self::try_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 Leaves-To-Root or Root-To-Leaves 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.
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ยง

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ยง

from_addr
Constructs a new instance of a DirectoryService from an URI.
register_directory_services ๐Ÿ”’
Registers the builtin DirectoryService implementations with the registry

Type Aliasesยง

Error