diff options
Diffstat (limited to 'src/vyconf_client.ml')
-rw-r--r-- | src/vyconf_client.ml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vyconf_client.ml b/src/vyconf_client.ml index 94348b2..5437428 100644 --- a/src/vyconf_client.ml +++ b/src/vyconf_client.ml @@ -117,3 +117,12 @@ let validate client path = | Success -> Lwt.return (Ok "") | Fail -> Error (Option.value resp.error ~default:"") |> Lwt.return | _ -> Error (Option.value resp.error ~default:"") |> Lwt.return + +let reload_reftree ?(on_behalf_of=None) client = + let id = on_behalf_of |> (function None -> None | Some x -> (Some (Int32.of_int x))) in + let req = Reload_reftree {on_behalf_of=id} in + let%lwt resp = do_request client req in + match resp.status with + | Success -> Ok "" |> Lwt.return + | Fail -> Error (Option.value resp.error ~default:"") |> Lwt.return + | _ -> Error (Option.value resp.error ~default:"") |> Lwt.return |