package albatross
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=fca03a99220d743386ed97900271e2fb1e38c48c56f10faa2a47757fc931db8e
sha512=ee608bcd42047f702bfe6007f664dc10d71faa4f2aeaedf278802c58f6b3bcfe35d53ebcb73f5e3ce59bbc9e6bfa8f27e81051d10a690876fa035b0279e950da
doc/albatross/Vmm_trie/index.html
Module Vmm_trieSource
A trie data structure where Vmm_core.Name.t elements are the edges, and 'a option is at each nodes.
Since policies are modeled as X.509 arcs, or paths, or domain names - we often need a data structure to access all nodes at the same level (and ensure there's at most one thing at each level.
The type of a Vmm_trie.
insert name v t returns the new t', where t'(name) = Some v (this is the only modification). Also, potentially t(name) is returned, if it was present.
remove name t removes the value t(name), and returns the new t'.
find name t returns the value t(name), if present.
collect name t finds for each sub-element of name the connected values. If name is "foo:bar", ("foo:bar", t("foo:bar")) :: ("foo", t("foo")) :: ("", t("")) :: [] are returned (only the values present are returned.
This is at the moment used in the albatross statistics daemon, but it may be removed soon.
all t flattens the trie into an associative list.
fold path t f init folds f over t at path. Each subnode of path is passed to f.