Module Awskit.TimeoutSource

Runtime timeout policy.

Runtime-neutral timeout policy.

Sourcetype phase = [
  1. | `Connect
  2. | `Attempt
  3. | `Operation
  4. | `Request_body
  5. | `Response_body
  6. | `Drain
]

Named timeout phases a runtime may enforce. `Operation is scoped to one runtime transport operation. For service calls that retry, the operation timer is applied independently to each attempt and does not include retry sleeps.

Sourcetype policy

Timeout policy for runtime adapters. None means no timeout for that phase.

Sourceval create : ?connect:Ptime.Span.t -> ?attempt:Ptime.Span.t -> ?operation:Ptime.Span.t -> ?request_body:Ptime.Span.t -> ?response_body:Ptime.Span.t -> ?drain:Ptime.Span.t -> unit -> (policy, Error.t) result

Build a timeout policy. Present spans must be positive.

Sourceval create_exn : ?connect:Ptime.Span.t -> ?attempt:Ptime.Span.t -> ?operation:Ptime.Span.t -> ?request_body:Ptime.Span.t -> ?response_body:Ptime.Span.t -> ?drain:Ptime.Span.t -> unit -> policy

Like create, but raises Error.Awskit_error carrying the structured validation error on validation failure.

Sourceval default : policy

Conservative default policy. Currently enables connect and drain timeouts and leaves the other phases disabled.

Sourceval disabled : policy

Policy with all timeout phases disabled.

Sourceval span : policy -> phase -> Ptime.Span.t option

Return the configured span for a phase.