GRPC.Client.Adapters.Gun.ConnectionProcess (gRPC Client v1.0.3)

Copy Markdown View Source

Owns long-lived Gun connections on behalf of the Gun adapter.

This process exists so named Gun-backed channels are no longer tied to the lifecycle of the process that happened to call GRPC.Stub.connect/2.

Without this wrapper, GRPC.Client.Connection would need to own Gun directly or understand Gun-specific owner messages. Keeping Gun ownership in this adapter-local process preserves a clean adapter boundary while ensuring the underlying Gun connection survives short-lived callers.

Request-specific Gun messages are routed to per-stream response processes, so this process only needs to manage connection-level lifecycle and stream bookkeeping.

Summary

Functions

cancel(connection_process_pid, stream_ref)

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

connect(channel, open_opts)

disconnect(connection_process_pid)

open_stream(connection_process_pid, path, headers)

request(connection_process_pid, path, headers, body)

send_data(connection_process_pid, stream_ref, fin, data)

start_link(channel, open_opts)