GrpcClient.Connection.Config (GrpcClient v0.2.0-alpha.4)

Configuration the GrpcClient connection

Options

  • :mint_opts - (default: [protocols: [:http2], mode: :active, tcp_opts: [nodelay: true]]) a keyword list of options to pass to mint. The default values cannot be overridden.

  • :host - (default: "http://localhost") the host address of the gRPC server

  • :port - (default: 2113) the external gRPC port of the gRPC server

  • :tls? - (default: false) whether or not to use TLS to secure the connection to the EventStoreDB

  • :keep_alive_interval - (default: 10_000ms - 10s) the period to send keep-alive pings to the EventStoreDB. Set -1 to disable keep-alive checks. Should be any integer value >= 10_000. This option can be used in conjunction with :keep_alive_timeout to properly disconnect if the EventStoreDB is not responding to network traffic.

  • :keep_alive_timeout - (default: 10_000ms - 10s) the time after sending a keep-alive ping when the ping will be considered unacknowledged. Used in conjunction with :keep_alive_interval. Set to -1 to disable keep-alive checks. Should be any integer value >= 10_000.

  • :url (String.t/0) - The default value is "http://localhost:50051".

  • :ssl_key_log_file (String.t/0)

  • :keep_alive_interval - The default value is 10000.

  • :keep_alive_timeout - The default value is 10000.

  • :mint_opts (keyword/0) - Required.

Summary

Types

t()

gRPC connection configuration

Types

t()

@type t() :: %GrpcClient.Connection.Config{
  host: Mint.Types.address(),
  keep_alive_interval: pos_integer() | false,
  keep_alive_timeout: pos_integer() | false,
  mint_opts: Keyword.t(),
  port: :inet.port_number(),
  scheme: :http | :https,
  ssl_key_log_file: String.t() | nil
}

gRPC connection configuration

Functions

new(opts)

@spec new(Keyword.t()) :: t()