diff options
author | John Estabrook <jestabro@vyos.io> | 2024-10-23 18:50:46 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2024-10-27 20:50:47 -0500 |
commit | 92b9c5e1a47be12b1e5dd7c6f069e69d28465eac (patch) | |
tree | 316c6431b2aa6fd2324f47d8de177411b6c868b8 /src/vyconfd.ml | |
parent | 037c3ce961e1fec94b1d50b069b69c6636ac0393 (diff) | |
download | vyconf-92b9c5e1a47be12b1e5dd7c6f069e69d28465eac.tar.gz vyconf-92b9c5e1a47be12b1e5dd7c6f069e69d28465eac.zip |
T6718: add rule to generate protobuf with name change
Regenerate protobuf files:
ocaml-protoc --ml_out src/ data/vyconf.proto
The generated files vyconf.* are renamed vyconf_pbt.* instead of the
split into vyconf_pb/vyconf_types as in the original implementation.
Diffstat (limited to 'src/vyconfd.ml')
-rw-r--r-- | src/vyconfd.ml | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/vyconfd.ml b/src/vyconfd.ml index 59425ee..729be73 100644 --- a/src/vyconfd.ml +++ b/src/vyconfd.ml @@ -1,7 +1,6 @@ open Lwt -open Vyconf_connect.Vyconf_types -open Vyconf_connect.Vyconf_pb +open Vyconf_connect.Vyconf_pbt open Vyconfd_config.Defaults module FP = FilePath @@ -138,7 +137,7 @@ let show_config world token (req: request_show_config) = let send_response oc resp = let enc = Pbrt.Encoder.create () in - let%lwt () = encode_response resp enc |> return in + let%lwt () = encode_pb_response resp enc |> return in let%lwt resp_msg = Pbrt.Encoder.to_bytes enc |> return in let%lwt () = Vyconf_connect.Message.write oc resp_msg in Lwt.return () @@ -148,7 +147,7 @@ let rec handle_connection world ic oc fd () = let%lwt req_msg = Vyconf_connect.Message.read ic in let%lwt req = try - let envelope = decode_request_envelope (Pbrt.Decoder.of_bytes req_msg) in + let envelope = decode_pb_request_envelope (Pbrt.Decoder.of_bytes req_msg) in Lwt.return (Ok (envelope.token, envelope.request)) with Pbrt.Decoder.Failure e -> Lwt.return (Error (Pbrt.Decoder.error_to_string e)) in |