ExUtcp.Transports.Grpc (ex_utcp v0.3.2)

Copy Markdown View Source

Production-ready gRPC transport implementation for UTCP.

This transport handles gRPC-based tool providers with:

  • Real gRPC connections using Protocol Buffers
  • Connection pooling and lifecycle management
  • Authentication support (API Key, Basic, OAuth2)
  • Error recovery with retry logic
  • gNMI integration for network management
  • High-performance streaming capabilities

Summary

Functions

Returns a specification to start this module under a supervisor.

Performs a gNMI Get operation.

Performs a gNMI Set operation.

Performs a gNMI Subscribe operation.

Creates a new gRPC transport.

Starts the gRPC transport GenServer.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

gnmi_get(provider, paths, opts \\ [])

@spec gnmi_get(pid(), [String.t()], keyword()) :: {:ok, map()} | {:error, term()}

Performs a gNMI Get operation.

gnmi_set(provider, updates, opts \\ [])

@spec gnmi_set(pid(), [map()], keyword()) :: {:ok, map()} | {:error, term()}

Performs a gNMI Set operation.

gnmi_subscribe(provider, paths, opts \\ [])

@spec gnmi_subscribe(pid(), [String.t()], keyword()) ::
  {:ok, [map()]} | {:error, term()}

Performs a gNMI Subscribe operation.

new(opts \\ [])

@spec new(keyword()) :: %ExUtcp.Transports.Grpc{
  connection_timeout: non_neg_integer(),
  logger: function(),
  max_retries: non_neg_integer(),
  pool_opts: keyword(),
  retry_config: map(),
  retry_delay: non_neg_integer()
}

Creates a new gRPC transport.

start_link(opts \\ [])

@spec start_link(keyword()) :: {:ok, pid()} | {:error, term()}

Starts the gRPC transport GenServer.