package balancer

  1. Overview
  2. Docs

Parameters

module SS : Serverset.S
module D : Distributor.S with type state = SS.t

Signature

include module type of struct include SS end
type elt = SS.elt
type t = SS.t
val update : t -> Serverset.NodeSet.t -> elt Lwt.t

A function to maintain server set retrieved from an external source

val from_src : t -> Serverset.NodeSet.t React.S.t -> t

Use a reference cell to maintain the ServerSet using update when an event is triggered

val of_nodes : Node.t list -> t
val add_node : t -> Node.t -> elt Lwt.t
val rm_node : t -> Node.t -> elt Lwt.t
val nodes : t -> Node.t list Lwt.t
include module type of struct include D end
type param = D.param
type state = SS.t
type peer = D.peer
val pick : state -> param -> peer Lwt.t
val use : state -> param -> (Node.t -> 'a Lwt.t) -> 'a Lwt.t
OCaml

Innovation. Community. Security.