Rujira.Node behaviour (rujira_ex v0.0.1)

Copy Markdown View Source

Behaviour and configurable delegator for chain node queries.

Consumers configure the implementation via application env:

config :rujira_ex, node: MyApp.NodeImpl

The implementation must export query/3.

Summary

Types

query_fun3()

@type query_fun3() :: (GRPC.Channel.t(), term(), keyword() ->
                   {:ok, term()} | {:error, GRPC.RPCError.t() | term()})

query_fun()

@type query_fun() :: (GRPC.Channel.t(), term() ->
                  {:ok, term()} | {:error, GRPC.RPCError.t() | term()})

Callbacks

query(arg1, term, keyword)

@callback query(query_fun() | query_fun3(), term(), keyword()) ::
  {:ok, term()} | {:error, term()}

Functions

query(fun, request, opts \\ [])

@spec query(query_fun() | query_fun3(), term(), keyword()) ::
  {:ok, term()} | {:error, term()}