Library
Module
Module type
Parameter
Class
Class type
val pp_action : action Fmt.t
pp_action ppf a
pretty-prints the action a
on ppf
.
type event =
| Resolved_a of [ `host ] Domain_name.t * Ipaddr.V4.Set.t
| Resolved_aaaa of [ `host ] Domain_name.t * Ipaddr.V6.Set.t
| Resolved_a_failed of [ `host ] Domain_name.t
| Resolved_aaaa_failed of [ `host ] Domain_name.t
| Connection_failed of [ `host ] Domain_name.t * int * Ipaddr.t * int
| Connected of [ `host ] Domain_name.t * int * Ipaddr.t * int
The variant of events.
val pp_event : event Fmt.t
pp_event ppf e
pretty-prints event e
on ppf
.
val create : int64 -> t
create ts
creates the internal state, initialized with the timestamp ts
(an arbitrary number that must be monotonically increasing).
timer t ts
is a timer function that results in an updated t
and a list of actions that need to be performed (connection to be retried, connection failures to be repored, ...)
connect t ts ~id host ports
attempts a connection to host
, where the ports
are attempted in sequence. It results in an updated t
and a list of actions to be performed.
connect_ip t ts ~id addresses
attempts a connection to addresses
. By default, the list will be tried in sequence. The ports will be tried in sequence. The result is an updated t
and a list of actions to be performed.
event t ts ev
results in an updated t
and a list of actions to be performed.
module Waiter_map : sig ... end
A map for waiters and internal id.