package sihl

  1. Overview
  2. Docs
type 'a t = {
  1. name : string;
  2. input_to_string : 'a -> string option;
  3. string_to_input : string option -> ('a, string) Result.t;
  4. handle : 'a -> (unit, string) Result.t Lwt.t;
  5. failed : string -> (unit, string) Result.t Lwt.t;
  6. max_tries : int;
  7. retry_delay : Sihl__.Core_time.duration;
}
val name : string
module type Sig = sig ... end
val to_sexp : 'a t -> Sexplib0.Sexp.t
val pp : Stdlib.Format.formatter -> 'a t -> unit
val default_tries : int
val default_retry_delay : Sihl__.Core_time.duration
val create : name:string -> input_to_string:('a -> string option) -> string_to_input:(string option -> ('a, string) Result.t) -> handle:('a -> (unit, string) Result.t Lwt.t) -> ?failed:(string -> (unit, string) Lwt_result.t) -> unit -> 'a t
val set_max_tries : int -> 'a t -> 'a t
val set_retry_delay : Sihl__.Core_time.duration -> 'a t -> 'a t
OCaml

Innovation. Community. Security.