My agentic slop goes here. Not intended for anyone else!
at jsont 795 B view raw
1(** JMAP Connection Management *) 2 3type config = { 4 max_retries : int; 5 timeout : float; 6 user_agent : string; 7} 8 9let default_config = { 10 max_retries = 3; 11 timeout = 30.0; 12 user_agent = "jmap-ocaml/0.1.0"; 13} 14 15type auth = 16 | Basic of string * string 17 | Bearer of string 18 19type t = { 20 config : config; 21 auth : auth option; 22} 23 24(** Config accessors *) 25let max_retries c = c.max_retries 26let timeout c = c.timeout 27let user_agent c = c.user_agent 28 29(** Config constructor *) 30let config_v ~max_retries ~timeout ~user_agent = 31 { max_retries; timeout; user_agent } 32 33(** Connection accessors *) 34let config t = t.config 35let auth t = t.auth 36 37(** Connection constructor *) 38let v ?(config = default_config) ?auth () = 39 { config; auth } 40 41(** Legacy alias for backwards compatibility *) 42let create = v