Add /monitor/commit_hash
RPC
This commit is contained in:
parent
b4e6018dd1
commit
e9eac31e9a
@ -147,4 +147,8 @@ let build_rpc_directory validator mainchain_validator =
|
||||
RPC_answer.return_stream { next ; shutdown }
|
||||
end ;
|
||||
|
||||
gen_register0 Monitor_services.S.commit_hash begin fun () () ->
|
||||
RPC_answer.return Tezos_base.Current_git_info.commit_hash
|
||||
end ;
|
||||
|
||||
!dir
|
||||
|
@ -100,6 +100,13 @@ module S = struct
|
||||
~output: Protocol_hash.encoding
|
||||
RPC_path.(path / "protocols")
|
||||
|
||||
let commit_hash =
|
||||
RPC_service.get_service
|
||||
~description:"Get information on the build of the node."
|
||||
~query: RPC_query.empty
|
||||
~output: string
|
||||
RPC_path.(path / "commit_hash")
|
||||
|
||||
end
|
||||
|
||||
open RPC_context
|
||||
@ -122,3 +129,6 @@ let heads ctxt ?(next_protocols = []) chain =
|
||||
|
||||
let protocols ctxt =
|
||||
make_streamed_call S.protocols ctxt () () ()
|
||||
|
||||
let commit_hash ctxt =
|
||||
make_call S.commit_hash ctxt () () ()
|
||||
|
@ -45,6 +45,8 @@ val protocols:
|
||||
#streamed ->
|
||||
(Protocol_hash.t Lwt_stream.t * stopper) tzresult Lwt.t
|
||||
|
||||
val commit_hash: #simple -> string tzresult Lwt.t
|
||||
|
||||
module S : sig
|
||||
|
||||
val bootstrapped:
|
||||
@ -70,5 +72,7 @@ module S : sig
|
||||
unit, unit, unit,
|
||||
Protocol_hash.t) RPC_service.t
|
||||
|
||||
val commit_hash:
|
||||
([ `GET ], unit, unit, unit, unit, string) RPC_service.t
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user