module Writer0: sig
.. end
default is true
module Core_unix: Core.Unix
module Unix: Unix_syscalls
module IOVec: Core.Unix.IOVec
module Id: Core.Std.Unique_id.Int63
(
sig
end
)
val io_stats : Io_stats.t
val debug : bool
module Check_buffer_age': sig
.. end
module Open_flags: Unix.Open_flags
type
open_flags = (Open_flags.t, exn) Core.Std.Result.t
val sexp_of_open_flags : (Open_flags.t, Core_kernel.Exn.t) Core.Std.Result.t -> Sexplib.Sexp.t
type
t = {
|
id : Id.t ; |
|
mutable fd : Fd.t ; |
|
monitor : Import.Monitor.t ; |
|
mutable background_writer_state : [ `Not_running | `Running | `Stopped_permanently ] ; |
|
syscall : [ `Per_cycle | `Periodic of Core.Std.Time.Span.t ] ; |
|
mutable bytes_received : Core.Std.Int63.t ; |
|
mutable bytes_written : Core.Std.Int63.t ; |
|
mutable scheduled : (Core.Std.Bigstring.t IOVec.t * [ `Destroy | `Keep ]) Core.Std.Queue.t Core.Std.sexp_opaque ; |
|
mutable scheduled_bytes : int ; |
|
mutable buf : Core.Std.Bigstring.t Core.Std.sexp_opaque ; |
|
mutable scheduled_back : int ; |
|
mutable back : int ; |
|
flushes : (Core.Std.Time.t Import.Ivar.t * Core.Std.Int63.t) Core.Std.Queue.t Core.Std.sexp_opaque ; |
|
mutable close_state : [ `Closed | `Closed_and_flushing | `Open ] ; |
|
close_finished : unit Import.Ivar.t ; |
|
producers_to_flush_at_close : (unit -> unit Import.Deferred.t) Core.Std.Bag.t ; |
|
mutable flush_at_shutdown_elt : t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option ; |
|
mutable check_buffer_age : t Core.Std.sexp_opaque Check_buffer_age'.t Core.Std.Bag.Elt.t option ; |
|
consumer_left : unit Import.Ivar.t ; |
|
mutable raise_when_consumer_leaves : bool ; |
|
open_flags : open_flags Import.Deferred.t ; |
}
val sexp_of_t : t -> Sexplib.Sexp.t
val open_flags : t -> open_flags Import.Deferred.t
val raise_when_consumer_leaves : t -> bool
val set_raise_when_consumer_leaves : t -> bool -> unit
val consumer_left : t -> unit Import.Ivar.Deferred.t
val check_buffer_age : t ->
t Core.Std.sexp_opaque Check_buffer_age'.t Core.Std.Bag.Elt.t
option
val set_check_buffer_age : t ->
t Core.Std.sexp_opaque Check_buffer_age'.t Core.Std.Bag.Elt.t
option -> unit
val flush_at_shutdown_elt : t -> t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option
val set_flush_at_shutdown_elt : t -> t Core.Std.sexp_opaque Core.Std.Bag.Elt.t option -> unit
val producers_to_flush_at_close : t -> (unit -> unit Import.Deferred.t) Core.Std.Bag.t
val close_finished : t -> unit Import.Ivar.Deferred.t
val close_state : t -> [ `Closed | `Closed_and_flushing | `Open ]
val set_close_state : t -> [ `Closed | `Closed_and_flushing | `Open ] -> unit
val flushes : t ->
(Core.Std.Time.t Import.Ivar.t * Core.Std.Int63.t) Core.Std.Queue.t
Core.Std.sexp_opaque
val back : t -> int
val set_back : t -> int -> unit
val scheduled_back : t -> int
val set_scheduled_back : t -> int -> unit
val buf : t -> Core.Std.Bigstring.t Core.Std.sexp_opaque
val set_buf : t -> Core.Std.Bigstring.t Core.Std.sexp_opaque -> unit
val scheduled_bytes : t -> int
val set_scheduled_bytes : t -> int -> unit
val scheduled : t ->
(Core.Std.Bigstring.t IOVec.t * [ `Destroy | `Keep ])
Core.Std.Queue.t Core.Std.sexp_opaque
val set_scheduled : t ->
(Core.Std.Bigstring.t IOVec.t * [ `Destroy | `Keep ])
Core.Std.Queue.t Core.Std.sexp_opaque -> unit
val bytes_written : t -> Core.Std.Int63.t
val set_bytes_written : t -> Core.Std.Int63.t -> unit
val bytes_received : t -> Core.Std.Int63.t
val set_bytes_received : t -> Core.Std.Int63.t -> unit
val syscall : t -> [ `Per_cycle | `Periodic of Core.Std.Time.Span.t ]
val background_writer_state : t -> [ `Not_running | `Running | `Stopped_permanently ]
val set_background_writer_state : t -> [ `Not_running | `Running | `Stopped_permanently ] -> unit
val monitor : t -> Import.Monitor.t
val fd : t -> Fd.t
val set_fd : t -> Fd.t -> unit Async_core.Deferred.t
val id : t -> Id.t
module Fields: sig
.. end
type
writer = t
val sexp_of_writer : t -> Sexplib.Sexp.t
val set_raise_when_consumer_leaves : t -> bool -> unit
val bytes_to_write : t -> int
val is_stopped_permanently : t -> bool
val iovecs_length : ('a IOVec.t * 'b) Core.Std.Queue.t -> int
val invariant : t Core.Std.sexp_opaque -> unit
module Check_buffer_age: sig
.. end
val flushed_time : t -> Core.Std.Time.t Async_core.Deferred.t
val flushed : t -> unit Import.Deferred.t
val set_fd : t -> Fd.t -> unit Async_core.Deferred.t
val consumer_left : t -> unit Import.Ivar.Deferred.t
val close_finished : t -> unit Import.Ivar.Deferred.t
val is_closed : t -> bool
val is_open : t -> bool
val writers_to_flush_at_shutdown : t Core.Std.sexp_opaque Core.Std.sexp_opaque Core.Std.sexp_opaque
Core.Std.sexp_opaque Core.Std.sexp_opaque Core.Std.Bag.t
val final_flush : ?force:unit Import.Deferred.t -> t -> unit Import.Deferred.t
val close : ?force_close:unit Import.Deferred.t ->
t -> unit Import.Ivar.Deferred.t
val fill_flushes : t -> unit
val stop_permanently : t -> unit
val die : t -> Core.Std.Error.t -> 'a
type
buffer_age_limit = [ `At_most of Core.Std.Time.Span.t | `Unlimited ]
val __buffer_age_limit_of_sexp__ : Sexplib.Sexp.t -> [> `At_most of Core.Std.Time.Span.t | `Unlimited ]
val buffer_age_limit_of_sexp : Sexplib.Sexp.t -> [> `At_most of Core.Std.Time.Span.t | `Unlimited ]
val sexp_of_buffer_age_limit : [< `At_most of Core.Std.Time.Span.t | `Unlimited ] -> Sexplib.Sexp.t
val bin_size_buffer_age_limit : [> `At_most of Core.Std.Time.Span.t ] -> int
val bin_write_buffer_age_limit : Bin_prot.Common.buf ->
pos:Bin_prot.Common.pos ->
[< `At_most of Core.Std.Time.Span.t | `Unlimited ] ->
Core_kernel.Std.Bin_prot.Common.pos
val bin_writer_buffer_age_limit : [< `At_most of Core.Std.Time.Span.t | `Unlimited > `At_most ]
Bin_prot.Type_class.writer
val __bin_read_buffer_age_limit__ : Core_kernel.Std.Bin_prot.Common.buf ->
pos_ref:Core_kernel.Std.Bin_prot.Common.pos_ref ->
int -> [> `At_most of Core.Std.Time.Span.t | `Unlimited ]
val bin_read_buffer_age_limit : Bin_prot.Common.buf ->
pos_ref:Bin_prot.Common.pos_ref ->
[> `At_most of Core.Std.Time.Span.t | `Unlimited ]
val bin_reader_buffer_age_limit : [> `At_most of Core.Std.Time.Span.t | `Unlimited ]
Bin_prot.Type_class.reader
val bin_buffer_age_limit : [ `At_most of Core.Std.Time.Span.t | `Unlimited ]
Bin_prot.Type_class.t
default is true
val create : ?buf_len:int ->
?syscall:[ `Per_cycle | `Periodic of Core.Std.Time.Span.t ] ->
?buffer_age_limit:[ `At_most of Core.Std.Time.Span.t | `Unlimited ] ->
?raise_when_consumer_leaves:bool -> Fd.t -> t
val set_buffer_age_limit : writer -> [ `At_most of Core.Std.Time.Span.t | `Unlimited ] -> unit
val of_out_channel : Core.Std.Out_channel.t -> Fd.Kind.t -> t
val ensure_can_write : t -> unit
val open_file : ?append:bool ->
?close_on_exec:bool ->
?perm:Unix.file_perm -> string -> t Async_core.Deferred.t
val with_close : t -> f:(unit -> 'a Async_core.Deferred.t) -> 'a Async_core.Deferred.t
val with_writer_exclusive : t -> (unit -> 'a Async_core.Deferred.t) -> 'a Async_core.Deferred.t
val with_file : ?perm:Unix.file_perm ->
?append:bool ->
?exclusive:bool ->
string ->
f:(t -> 'a Async_core.Deferred.t) -> 'a Async_core.Deferred.t
val got_bytes : t -> int -> unit
val add_iovec : t ->
[ `Destroy | `Keep ] ->
Core.Std.Bigstring.t IOVec.t -> count_bytes_as_received:bool -> unit
val schedule_unscheduled : t -> [ `Destroy | `Keep ] -> unit
val dummy_iovec : IOVec.bigstring IOVec.t
val mk_iovecs : t ->
IOVec.bigstring IOVec.t Core.Std.Array.t * bool * int
val thread_io_cutoff : int
val fd_closed : t -> unit
val start_write : t -> unit
val write_when_ready : t -> unit
val write_finished : t -> int -> unit
val maybe_start_writer : t -> unit
val give_buf : t -> int -> Core.Std.Bigstring.t Core.Std.sexp_opaque * int
module Write: functor (
Src
:
sig
end
) ->
sig
.. end
val write : ?pos:int -> ?len:int -> t -> Core.Std.Substring.base -> unit
val write_bigstring : ?pos:int -> ?len:int -> t -> Core.Std.Bigstring.t -> unit
val write_substring : t -> Core.Std.Substring.t -> unit
val write_bigsubstring : t -> Core.Std.Bigsubstring.t -> unit
val writef : t -> ('a, unit, string, unit) Pervasives.format4 -> 'a
val to_formatter : t -> Format.formatter
val write_char : t -> char -> unit
val newline : t -> unit
val write_line : t -> Core.Std.Substring.base -> unit
val write_byte : t -> Core.Std.Int.t -> unit
val write_sexp : ?hum:bool -> t -> Core.Std.Sexp.t -> unit
include struct ... end
val write_marshal : t -> flags:Marshal.extern_flags list -> 'a -> unit
val send : t -> Core.Std.String.t -> unit
val schedule_iovec : t -> Core.Std.Bigstring.t IOVec.t -> unit
val schedule_iovecs : t -> Core.Std.Bigstring.t IOVec.t Core.Std.Queue.t -> unit
val schedule_bigstring : t -> ?pos:int -> ?len:int -> IOVec.bigstring -> unit
val schedule_bigsubstring : t -> Core.Std.Bigsubstring.t -> unit
val fsync : t -> unit Async_core.Deferred.t
val fdatasync : t -> unit Async_core.Deferred.t
val write_bin_prot : t -> 'a Bin_prot.Type_class.writer -> 'a -> unit
val send : t -> Core.Std.String.t -> unit
val schedule_iovec : t -> Core.Std.Bigstring.t IOVec.t -> unit
val schedule_iovecs : t -> Core.Std.Bigstring.t IOVec.t Core.Std.Queue.t -> unit
val schedule_bigstring : t -> ?pos:int -> ?len:int -> IOVec.bigstring -> unit
val write : ?pos:int -> ?len:int -> t -> Core.Std.Substring.base -> unit
val write_line : t -> Core.Std.Substring.base -> unit
val writef : t -> ('a, unit, string, unit) Pervasives.format4 -> 'a
val write_marshal : t -> flags:Marshal.extern_flags list -> 'a -> unit
val write_sexp : ?hum:bool -> t -> Core.Std.Sexp.t -> unit
val write_bigsubstring : t -> Core.Std.Bigsubstring.t -> unit
val write_substring : t -> Core.Std.Substring.t -> unit
val write_byte : t -> Core.Std.Int.t -> unit
val write_char : t -> char -> unit
val newline : t -> unit
val stdout_and_stderr : (t * t) lazy_t
val stdout : t lazy_t
val stderr : t lazy_t
val apply_umask : int -> int
val with_file_atomic : ?temp_file:string ->
?perm:Unix.file_perm ->
?fsync:bool ->
string ->
f:(t -> 'a Async_core.Deferred.t) -> 'a Async_core.Deferred.t
val save : ?temp_file:string ->
?perm:Unix.file_perm ->
?fsync:bool ->
string -> contents:Core.Std.Substring.base -> unit Async_core.Deferred.t
val save_lines : ?temp_file:string ->
?perm:Unix.file_perm ->
?fsync:bool ->
string ->
Core.Std.Substring.base Core.Std.List.t -> unit Async_core.Deferred.t
val sexp_to_buffer : ?hum:bool -> buf:Buffer.t -> Core.Std.Sexp.t -> unit
val save_sexp : ?temp_file:string ->
?perm:Unix.file_perm ->
?fsync:bool ->
?hum:bool -> string -> Core.Std.Sexp.t -> unit Async_core.Deferred.t
val with_flushed_at_close : t ->
flushed:(unit -> unit Import.Deferred.t) ->
f:(unit -> 'a Async_core.Deferred.t) -> 'a Async_core.Deferred.t
val transfer : ?stop:unit Import.Deferred.t ->
t ->
'a Import.Pipe.Reader.t -> ('a -> unit) -> unit Async_core.Deferred.t
val pipe : t -> Core.Std.Substring.base Import.Pipe.Writer.t
default is true