kurrentdb_erlang
Erlang HTTP/2 transport for the sans-IO KurrentDB core package.
Types
Transport-level errors from the Erlang backend.
pub type Error {
StreamFailed(String)
StreamTimeout
UnableToStartStream(String)
IncompleteHeader
CompressedMessage
IncompleteMessage(expected_bytes: Int)
}
Constructors
-
StreamFailed(String) -
StreamTimeout -
UnableToStartStream(String) -
IncompleteHeader -
CompressedMessage -
IncompleteMessage(expected_bytes: Int)
GrpcStream
opaqueAn opaque gRPC-level stream that wraps a raw HTTP/2 stream with a frame decoder.
pub opaque type GrpcStream
Stream
opaqueAn opaque raw HTTP/2 stream managed by a gleam_otp actor.
pub opaque type Stream
StreamStart
opaqueMessage sent to the stream supervisor to start a new stream.
pub opaque type StreamStart
Values
pub fn read_transport(
name: process.Name(
factory_supervisor.Message(StreamStart, Stream),
),
) -> kurrentdb.ReadTransport(GrpcStream, Error)
Build a ReadTransport for streaming gRPC calls through the named stream supervisor.
pub fn send(
name: process.Name(
factory_supervisor.Message(StreamStart, Stream),
),
) -> fn(request.Request(BitArray)) -> Result(
response.Response(BitArray),
Error,
)
Build a send function for unary gRPC calls through the named stream supervisor.
pub fn start_stream(
name: process.Name(
factory_supervisor.Message(StreamStart, Stream),
),
) -> Result(
actor.Started(
factory_supervisor.Supervisor(StreamStart, Stream),
),
Error,
)
Start a stream supervisor process under the default gleam_otp actor system.
pub fn supervised_stream(
name: process.Name(
factory_supervisor.Message(StreamStart, Stream),
),
) -> supervision.ChildSpecification(
factory_supervisor.Supervisor(StreamStart, Stream),
)
Build a child spec for the stream supervisor to use in a supervision tree.