2018-01-22 21:58:43 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
2018-02-06 00:17:03 +04:00
|
|
|
(* Copyright (c) 2014 - 2018. *)
|
2018-01-22 21:58:43 +04:00
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
2018-02-08 13:51:02 +04:00
|
|
|
open RPC_context
|
2018-01-22 21:58:43 +04:00
|
|
|
|
2018-02-08 13:51:02 +04:00
|
|
|
val stat: #simple -> P2p_stat.t tzresult Lwt.t
|
2018-01-22 21:58:43 +04:00
|
|
|
|
2018-02-08 13:51:02 +04:00
|
|
|
val versions: #simple -> P2p_version.t list tzresult Lwt.t
|
2018-01-22 21:58:43 +04:00
|
|
|
|
2018-02-08 13:51:02 +04:00
|
|
|
val events: #streamed ->
|
|
|
|
(P2p_connection.Pool_event.t Lwt_stream.t * stopper) tzresult Lwt.t
|
2018-01-22 21:58:43 +04:00
|
|
|
|
2018-02-08 13:51:02 +04:00
|
|
|
val connect: #simple -> timeout:float -> P2p_point.Id.t -> unit tzresult Lwt.t
|
2018-01-22 21:58:43 +04:00
|
|
|
|
2018-02-08 13:51:02 +04:00
|
|
|
module S : sig
|
|
|
|
|
|
|
|
val stat :
|
|
|
|
([ `POST ], unit,
|
|
|
|
unit, unit, unit,
|
|
|
|
P2p_stat.t) RPC_service.t
|
|
|
|
|
|
|
|
val versions :
|
2018-01-22 21:58:43 +04:00
|
|
|
([ `POST ], unit,
|
|
|
|
unit, unit, unit,
|
2018-02-08 13:51:02 +04:00
|
|
|
P2p_version.t list) RPC_service.t
|
2018-01-22 21:58:43 +04:00
|
|
|
|
2018-02-08 13:51:02 +04:00
|
|
|
val events :
|
2018-01-22 21:58:43 +04:00
|
|
|
([ `POST ], unit,
|
2018-02-08 13:51:02 +04:00
|
|
|
unit, unit, unit,
|
|
|
|
P2p_connection.Pool_event.t) RPC_service.t
|
2018-01-22 21:58:43 +04:00
|
|
|
|
2018-02-08 13:51:02 +04:00
|
|
|
val connect :
|
2018-01-22 21:58:43 +04:00
|
|
|
([ `POST ], unit,
|
2018-02-08 13:51:02 +04:00
|
|
|
unit * P2p_point.Id.t, unit, float,
|
2018-02-11 22:17:39 +04:00
|
|
|
unit) RPC_service.t
|
2018-01-22 21:58:43 +04:00
|
|
|
|
|
|
|
end
|
|
|
|
|
2018-02-08 13:51:02 +04:00
|
|
|
module Connections : sig
|
|
|
|
|
|
|
|
open RPC_context
|
|
|
|
|
|
|
|
val list: #simple -> P2p_connection.Info.t list tzresult Lwt.t
|
|
|
|
|
|
|
|
val info: #simple -> P2p_peer.Id.t -> P2p_connection.Info.t tzresult Lwt.t
|
|
|
|
|
|
|
|
val kick: #simple -> ?wait:bool -> P2p_peer.Id.t -> unit tzresult Lwt.t
|
|
|
|
|
|
|
|
module S : sig
|
|
|
|
|
|
|
|
val list :
|
|
|
|
([ `POST ], unit,
|
|
|
|
unit, unit, unit,
|
|
|
|
P2p_connection.Info.t list) RPC_service.t
|
|
|
|
|
|
|
|
val info :
|
|
|
|
([ `POST ], unit,
|
|
|
|
unit * P2p_peer.Id.t, unit, unit,
|
|
|
|
P2p_connection.Info.t) RPC_service.t
|
|
|
|
|
|
|
|
val kick :
|
|
|
|
([ `POST ], unit,
|
|
|
|
unit * P2p_peer.Id.t, unit, bool,
|
|
|
|
unit) RPC_service.t
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2018-01-22 21:58:43 +04:00
|
|
|
end
|
|
|
|
|
|
|
|
|
2018-02-08 13:51:02 +04:00
|
|
|
module Points : sig
|
2018-01-22 21:58:43 +04:00
|
|
|
|
2018-02-08 13:51:02 +04:00
|
|
|
val list:
|
|
|
|
?filter:(P2p_point.State.t list) ->
|
|
|
|
#simple -> (P2p_point.Id.t * P2p_point.Info.t) list tzresult Lwt.t
|
2018-01-22 21:58:43 +04:00
|
|
|
|
2018-02-08 13:51:02 +04:00
|
|
|
val info: #simple -> P2p_point.Id.t -> P2p_point.Info.t tzresult Lwt.t
|
|
|
|
|
|
|
|
val events:
|
|
|
|
#streamed ->
|
|
|
|
P2p_point.Id.t ->
|
|
|
|
(P2p_point.Pool_event.t list Lwt_stream.t * stopper) tzresult Lwt.t
|
|
|
|
|
|
|
|
module S : sig
|
|
|
|
|
|
|
|
val list :
|
|
|
|
([ `POST ], unit,
|
|
|
|
unit, unit, P2p_point.State.t list,
|
|
|
|
(P2p_point.Id.t * P2p_point.Info.t) list) RPC_service.t
|
|
|
|
|
|
|
|
val info :
|
|
|
|
([ `POST ], unit,
|
|
|
|
unit * P2p_point.Id.t, unit, unit,
|
|
|
|
P2p_point.Info.t) RPC_service.t
|
|
|
|
|
|
|
|
val events :
|
|
|
|
([ `POST ], unit,
|
|
|
|
unit * P2p_point.Id.t, unit, bool,
|
|
|
|
P2p_point.Pool_event.t list) RPC_service.t
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
module Peers : sig
|
|
|
|
|
|
|
|
val list:
|
|
|
|
?filter:(P2p_peer.State.t list) ->
|
|
|
|
#simple ->
|
|
|
|
(P2p_peer.Id.t * P2p_peer.Info.t) list tzresult Lwt.t
|
|
|
|
|
|
|
|
val info: #simple -> P2p_peer.Id.t -> P2p_peer.Info.t tzresult Lwt.t
|
|
|
|
|
|
|
|
val events:
|
|
|
|
#streamed -> P2p_peer.Id.t ->
|
|
|
|
(P2p_peer.Pool_event.t list Lwt_stream.t * stopper) tzresult Lwt.t
|
|
|
|
|
|
|
|
module S : sig
|
|
|
|
|
|
|
|
val list :
|
|
|
|
([ `POST ], unit,
|
|
|
|
unit, unit, P2p_peer.State.t list,
|
|
|
|
(P2p_peer.Id.t * P2p_peer.Info.t) list) RPC_service.t
|
|
|
|
|
|
|
|
val info :
|
|
|
|
([ `POST ], unit,
|
|
|
|
unit * P2p_peer.Id.t, unit, unit,
|
|
|
|
P2p_peer.Info.t) RPC_service.t
|
|
|
|
|
|
|
|
val events :
|
|
|
|
([ `POST ], unit,
|
|
|
|
unit * P2p_peer.Id.t, unit, bool,
|
|
|
|
P2p_peer.Pool_event.t list) RPC_service.t
|
|
|
|
|
|
|
|
end
|
2018-01-22 21:58:43 +04:00
|
|
|
|
|
|
|
end
|