Anoma.Client.Node.GRPCProxy (Anoma v0.34.0)

I am the GRPC proxy. I am responsible to translate requests to a node into GRPC requests. I return the value from the requests, or return an error.

Summary

Types

t()

I am the state of a TCP listener.

Types

t()

@type t() :: %Anoma.Client.Node.GRPCProxy{
  channel: any() | nil,
  client_id: String.t() | nil,
  grpc_port: integer() | nil,
  host: String.t() | nil,
  node_id: String.t() | nil,
  port: integer() | nil
}

I am the state of a TCP listener.

My fields contain information to listen for TCP connection with a remote node.

Fields

  • :port - The port on which the remote node is listening to GRPC.
  • :host - The host on which the remote node is listening to GRPC.
  • :channel - The channel to the remote grpc.
  • :node_id - The id of the remote node.
  • :grpc_port - The grpc port of the client.
  • :client_id - The id of the client.

Functions

add_intent(intent)

@spec add_intent(binary()) :: {:ok, :added} | {:error, :add_intent_failed, String.t()}

add_read_only_transaction(jammed_nock)

@spec add_read_only_transaction(binary()) ::
  {:ok, Noun.t()}
  | {:error, :absent}
  | {:error, :add_read_only_transaction_failed, String.t()}

add_transaction(jammed_nock, transaction_type, wrap? \\ false)

@spec add_transaction(binary(), atom(), boolean()) :: any()

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

list_intents()

@spec list_intents() :: {:ok, [binary()]} | {:error, :failed_to_fetch_intents}

start_link(args)

@spec start_link(startup_options()) :: GenServer.on_start()

subscribe(topic)

@spec subscribe(String.t()) :: {:ok, :subscribed} | {:error, :subscribe_failed, any()}