Regc.Oci.Transport.Reader (regc v0.0.2)
View SourceAn incremental transport response body.
Readers are single-consumer resources. They can be consumed with read/2,
enumerated directly, or converted to a stream with stream/2. Enumeration
always closes the reader when it finishes or halts early.
Summary
Functions
Returns a specification to start this module under a supervisor.
Closes the reader. Closing an already closed or empty reader is harmless.
Reads up to max_bytes from the response.
Returns a lazy stream of response chunks.
Types
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec close(t()) :: :ok
Closes the reader. Closing an already closed or empty reader is harmless.
@spec read(t(), pos_integer()) :: read_result()
Reads up to max_bytes from the response.
@spec stream(t(), pos_integer()) :: Enumerable.t()
Returns a lazy stream of response chunks.