Module P2p_peer_state.Info

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:Mavryk_base.TzPervasives.Time.System.t -> ?trusted:bool -> peer_metadata:'peer_meta -> Mavryk_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 -> Mavryk_base.TzPervasives.P2p_peer.Id.t
val created : ('conn, 'peer_meta, 'conn_meta) peer_info -> Mavryk_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 -> (Mavryk_base.TzPervasives.P2p_connection.Id.t * Mavryk_base.TzPervasives.Time.System.t) option
val last_rejected_connection : ('conn, 'peer_meta, 'conn_meta) peer_info -> (Mavryk_base.TzPervasives.P2p_connection.Id.t * Mavryk_base.TzPervasives.Time.System.t) option
val last_established_connection : ('conn, 'peer_meta, 'conn_meta) peer_info -> (Mavryk_base.TzPervasives.P2p_connection.Id.t * Mavryk_base.TzPervasives.Time.System.t) option
val last_disconnection : ('conn, 'peer_meta, 'conn_meta) peer_info -> (Mavryk_base.TzPervasives.P2p_connection.Id.t * Mavryk_base.TzPervasives.Time.System.t) option
val last_seen : ('conn, 'peer_meta, 'conn_meta) peer_info -> (Mavryk_base.TzPervasives.P2p_connection.Id.t * Mavryk_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 -> (Mavryk_base.TzPervasives.P2p_connection.Id.t * Mavryk_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:Mavryk_base.TzPervasives.Time.System.t -> ('conn, 'peer_meta, 'conn_meta) peer_info -> Mavryk_base.TzPervasives.P2p_connection.Id.t -> unit
module File : sig ... end
val events : ('conn, 'peer_meta, 'conn_meta) t -> Mavryk_base.TzPervasives.P2p_peer.Pool_event.t list
val watch : ('conn, 'peer_meta, 'conn_meta) t -> Mavryk_base.TzPervasives.P2p_peer.Pool_event.t Lwt_stream.t * Lwt_watcher.stopper