View Source OnFlow.Channel (on_flow v0.13.0)

Manages the GRPC channel state. Using this in production is not recommended.

Config options are:

  • :host - the host to connect to
  • :connect_on_start - true to start the channel on application start
  • :secure - true to use HTTP/2.
  • :metadata - metadata headers to send on connect.

Example:

config :on_flow,
  host: "grpc.example.com:443",
  connect_on_start: true,
  secure: true,
  metadata: [api_key: "123123"]

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Connects to the GRPC server. Blocks the process until a connection is established.

Connects to the GRPC server asynchronously.

Returns the current GRPC channel.

Sets the current GRPC channel. OnFlow will pull the channel from this GenServer to make requests, so use this to manage the channel manually if needed.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

connect(host \\ host(), opts \\ default_opts())

View Source

Connects to the GRPC server. Blocks the process until a connection is established.

Link to this function

connect_async(host \\ host(), opts \\ default_opts())

View Source

Connects to the GRPC server asynchronously.

Returns the current GRPC channel.

Sets the current GRPC channel. OnFlow will pull the channel from this GenServer to make requests, so use this to manage the channel manually if needed.