package tezos-p2p

  1. Overview
  2. Docs
type ('conn, 'peer_meta, 'conn_meta) t
type ('conn, 'peer_meta, 'conn_meta) peer_info = ('conn, 'peer_meta, 'conn_meta) t
val compare : ('conn, 'peer_meta, 'conn_meta) t -> ('conn, 'peer_meta, 'conn_meta) t -> int
val create : created:Tezos_base.TzPervasives.Time.System.t -> ?trusted:bool -> peer_metadata:'peer_meta -> Tezos_base.TzPervasives.P2p_peer.Id.t -> ('conn, 'peer_meta, 'conn_meta) peer_info

create ~trusted ~meta peer_id is a freshly minted peer_id info for peer_id.

val peer_id : ('conn, 'peer_meta, 'conn_meta) peer_info -> Tezos_base.TzPervasives.P2p_peer.Id.t
val created : ('conn, 'peer_meta, 'conn_meta) peer_info -> Tezos_base.TzPervasives.Time.System.t
val peer_metadata : ('conn, 'peer_meta, 'conn_meta) peer_info -> 'peer_meta
val set_peer_metadata : ('conn, 'peer_meta, 'conn_meta) peer_info -> 'peer_meta -> unit
val trusted : ('conn, 'peer_meta, 'conn_meta) peer_info -> bool
val set_trusted : ('conn, 'peer_meta, 'conn_meta) peer_info -> unit
val unset_trusted : ('conn, 'peer_meta, 'conn_meta) peer_info -> unit
val last_failed_connection : ('conn, 'peer_meta, 'conn_meta) peer_info -> (Tezos_base.TzPervasives.P2p_connection.Id.t * Tezos_base.TzPervasives.Time.System.t) option
val last_rejected_connection : ('conn, 'peer_meta, 'conn_meta) peer_info -> (Tezos_base.TzPervasives.P2p_connection.Id.t * Tezos_base.TzPervasives.Time.System.t) option
val last_established_connection : ('conn, 'peer_meta, 'conn_meta) peer_info -> (Tezos_base.TzPervasives.P2p_connection.Id.t * Tezos_base.TzPervasives.Time.System.t) option
val last_disconnection : ('conn, 'peer_meta, 'conn_meta) peer_info -> (Tezos_base.TzPervasives.P2p_connection.Id.t * Tezos_base.TzPervasives.Time.System.t) option
val last_seen : ('conn, 'peer_meta, 'conn_meta) peer_info -> (Tezos_base.TzPervasives.P2p_connection.Id.t * Tezos_base.TzPervasives.Time.System.t) option

last_seen gi is the most recent of:

* last established connection * last rejected connection * last disconnection

val last_miss : ('conn, 'peer_meta, 'conn_meta) peer_info -> (Tezos_base.TzPervasives.P2p_connection.Id.t * Tezos_base.TzPervasives.Time.System.t) option

last_miss gi is the most recent of:

* last failed connection * last rejected connection * last disconnection

val log_incoming_rejection : timestamp:Tezos_base.TzPervasives.Time.System.t -> ('conn, 'peer_meta, 'conn_meta) peer_info -> Tezos_base.TzPervasives.P2p_connection.Id.t -> unit
module File : sig ... end
val events : ('conn, 'peer_meta, 'conn_meta) t -> Tezos_base.TzPervasives.P2p_peer.Pool_event.t list
val watch : ('conn, 'peer_meta, 'conn_meta) t -> Tezos_base.TzPervasives.P2p_peer.Pool_event.t Lwt_stream.t * Lwt_watcher.stopper