Awskit_s3_lwt.MakeBuild an S3 adapter over a caller-supplied Cohttp Lwt client.
S3 connection handle for the supplied Cohttp client.
module Runtime :
Awskit_s3.RUNTIME with type 'a t = 'a Lwt.t and type connection = tLwt S3 runtime used by Awskit_s3.Make.
val create :
?ctx:Client.ctx ->
?endpoint_config:Awskit_s3.Endpoint_config.t ->
region:string ->
credentials:Awskit.Credentials.t ->
clock:(unit -> Ptime.t) ->
?retry_policy:Awskit.Retry.t ->
?sleep:(Ptime.Span.t -> unit Lwt.t) ->
?random_float:(upper_bound:float -> float) ->
?timeout_policy:Awskit.Timeout.policy ->
?max_response_drain_bytes:int ->
unit ->
(t, Awskit.Error.t) Stdlib.resultCreate a generic Lwt S3 client.
Use this when the application owns the Cohttp client module/context. The ready-to-use Unix variant is awskit-s3-lwt-unix. When retries are enabled, custom Lwt backends must pass real sleep and random_float capabilities or use Awskit.Retry.disabled. Explicit timeout policies with configured spans also require sleep. Use endpoint_config for AWS endpoint variants, local S3-compatible tests, or explicit endpoints that use S3-compatible signing/addressing rules. max_response_drain_bytes controls how much response body the runtime drains after successful consumers.
module Body : sig ... endmodule Reader :
Awskit_s3.READER
with type 'a io := 'a Lwt.t
and type t = Runtime.response_body_readermodule Object :
Awskit_s3.OBJECT
with type connection := t
and type 'a io := 'a Lwt.t
and type request_body := Body.t
and type response_body_reader := Reader.tObject operations returning Lwt.t.
module Bucket :
Awskit_s3.BUCKET with type connection := t and type 'a io := 'a Lwt.tBucket operations returning Lwt.t.
module Multipart :
Awskit_s3.MULTIPART
with type connection := t
and type 'a io := 'a Lwt.t
and type request_body := Body.tMultipart operations returning Lwt.t.
module Presigned :
Awskit_s3.PRESIGNED with type connection := t and type 'a io := 'a Lwt.tPresigned request artifact helpers returning Lwt.t.