aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/Initialization.ml
blob: 3eb8aed2ea85c50d9045069aa8515685e2d6623c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
module Make (S : Abstract.Storage.STORAGE) = struct
  module BM = BranchManager.Make (S)

  let initialize conn =
    let open Utilities.Result in
    let open Protocols in
    let root = Namespace.make () in
    let registry = Registry.from root |> Option.get in
    let* branch = BM.make conn "rnt-head" in
    let* () = Registry.register registry "branch" branch in
    Ok root
end