2016-09-08 21:13:10 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
2017-11-14 03:36:14 +04:00
|
|
|
(* Copyright (c) 2014 - 2017. *)
|
2016-09-08 21:13:10 +04:00
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
2017-01-14 16:13:27 +04:00
|
|
|
val may: f:('a -> unit Lwt.t) -> 'a option -> unit Lwt.t
|
2016-11-29 19:39:53 +04:00
|
|
|
|
2016-09-08 21:13:10 +04:00
|
|
|
val never_ending: 'a Lwt.t
|
|
|
|
|
2017-11-27 09:13:12 +04:00
|
|
|
val canceler: unit ->
|
2016-09-08 21:13:10 +04:00
|
|
|
(unit -> unit Lwt.t) *
|
|
|
|
(unit -> unit Lwt.t) *
|
|
|
|
((unit -> unit Lwt.t) -> unit)
|
|
|
|
|
|
|
|
val worker:
|
|
|
|
string ->
|
|
|
|
run:(unit -> unit Lwt.t) ->
|
|
|
|
cancel:(unit -> unit Lwt.t) ->
|
|
|
|
unit Lwt.t
|
|
|
|
|
|
|
|
val trigger: unit -> (unit -> unit) * (unit -> unit Lwt.t)
|
|
|
|
val queue: unit -> ('a -> unit) * (unit -> 'a list Lwt.t)
|
|
|
|
val sort: ('a -> 'a -> int Lwt.t) -> 'a list -> 'a list Lwt.t
|
2016-11-15 04:42:54 +04:00
|
|
|
|
|
|
|
val read_bytes:
|
|
|
|
?pos:int -> ?len:int -> Lwt_unix.file_descr -> bytes -> unit Lwt.t
|
|
|
|
|
|
|
|
val read_mbytes:
|
|
|
|
?pos:int -> ?len:int -> Lwt_unix.file_descr -> MBytes.t -> unit Lwt.t
|
|
|
|
|
2017-01-14 16:13:27 +04:00
|
|
|
val write_bytes:
|
|
|
|
?pos:int -> ?len:int -> Lwt_unix.file_descr -> bytes -> unit Lwt.t
|
2016-11-15 04:42:54 +04:00
|
|
|
val write_mbytes:
|
|
|
|
?pos:int -> ?len:int -> Lwt_unix.file_descr -> MBytes.t -> unit Lwt.t
|
2016-12-01 21:27:53 +04:00
|
|
|
|
|
|
|
val remove_dir: string -> unit Lwt.t
|
|
|
|
val create_dir: ?perm:int -> string -> unit Lwt.t
|
|
|
|
val create_file: ?perm:int -> string -> string -> unit Lwt.t
|
2017-01-14 16:13:27 +04:00
|
|
|
|
|
|
|
val safe_close: Lwt_unix.file_descr -> unit Lwt.t
|
|
|
|
|
|
|
|
open Error_monad
|
|
|
|
|
|
|
|
type error += Canceled
|
|
|
|
val protect :
|
|
|
|
?on_error:(error list -> 'a tzresult Lwt.t) ->
|
2017-11-27 09:13:12 +04:00
|
|
|
?canceler:Lwt_canceler.t ->
|
2017-01-14 16:13:27 +04:00
|
|
|
(unit -> 'a tzresult Lwt.t) -> 'a tzresult Lwt.t
|
|
|
|
|
|
|
|
type error += Timeout
|
|
|
|
val with_timeout:
|
2017-11-27 09:13:12 +04:00
|
|
|
?canceler:Lwt_canceler.t ->
|
|
|
|
float -> (Lwt_canceler.t -> 'a tzresult Lwt.t) -> 'a tzresult Lwt.t
|
2017-01-14 16:13:27 +04:00
|
|
|
|
2017-01-23 14:09:39 +04:00
|
|
|
val unless: bool -> (unit -> unit Lwt.t) -> unit Lwt.t
|
|
|
|
|
2017-01-30 22:10:16 +04:00
|
|
|
val getaddrinfo:
|
|
|
|
passive:bool ->
|
|
|
|
node:string -> service:string ->
|
|
|
|
(Ipaddr.V6.t * int) list Lwt.t
|