this repo has no description
at main 1.6 kB view raw
1open Types 2 3module Member : sig 4 type t 5 6 val create : 7 ?initial_state:member_state -> 8 ?initial_incarnation:incarnation -> 9 now:Mtime.span -> 10 node_info -> 11 t 12 13 val node : t -> node_info 14 val get_state : xt:'x Kcas.Xt.t -> t -> member_state 15 val get_incarnation : xt:'x Kcas.Xt.t -> t -> incarnation 16 val get_state_change_time : xt:'x Kcas.Xt.t -> t -> Mtime.span 17 val get_last_ack_time : xt:'x Kcas.Xt.t -> t -> Mtime.span 18 val set_state : xt:'x Kcas.Xt.t -> t -> member_state -> now:Mtime.span -> unit 19 val set_incarnation : xt:'x Kcas.Xt.t -> t -> incarnation -> unit 20 21 val set_alive : 22 xt:'x Kcas.Xt.t -> t -> incarnation:incarnation -> now:Mtime.span -> unit 23 24 val set_suspect : 25 xt:'x Kcas.Xt.t -> t -> incarnation:incarnation -> now:Mtime.span -> unit 26 27 val set_dead : 28 xt:'x Kcas.Xt.t -> t -> incarnation:incarnation -> now:Mtime.span -> unit 29 30 val record_ack : xt:'x Kcas.Xt.t -> t -> now:Mtime.span -> unit 31 val snapshot : xt:'x Kcas.Xt.t -> t -> member_snapshot 32 val snapshot_now : t -> member_snapshot 33end 34 35type t 36 37val create : unit -> t 38val add : t -> Member.t -> unit 39val remove : t -> node_id -> bool 40val find : t -> node_id -> Member.t option 41val mem : t -> node_id -> bool 42val to_list : t -> Member.t list 43val to_node_list : t -> node_info list 44val count : t -> int 45 46type member_updater = { update : 'x. Member.t -> xt:'x Kcas.Xt.t -> unit } 47 48val update_member : t -> node_id -> member_updater -> bool 49val iter_alive : t -> (Member.t -> member_snapshot -> unit) -> unit 50val snapshot_all : t -> member_snapshot list