aboutsummaryrefslogblamecommitdiffstats
path: root/lib/kernel/Initialization.ml
blob: ab91dbc7afb393f4c2841a47ea44ce16abd04aaf (plain) (tree)
1
2
3
4
5
6
7
8
9

                                                   
 
                       
                                



                                                      
                                                                    
           
   
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.update registry "branch" None (Some branch) in
    Ok root
end