RigInboundGateway.Proxy (Reactive Interaction Gateway v3.0.0-alpha.2) View Source
Enables persisting and CRUD operations for Proxy's API definitions in presence.
In a distributed setting, the node that does the persisting of API definitions spreads the information via Phoenix' PubSub Server as Phoenix Presence information. The other nodes react by tracking the same record themselves, which means that for one record and n nodes there are n items in the Presence list. The following properties are a result of this:
- API definitions managing can occur on/by any node.
- API definitions are eventually consistent over all nodes.
- Any node can go down and come up at any time without affecting the API definitions, except if all nodes go down at the same time (in that case there is nothing to synchronize from -- changes are not stored on disk).
Link to this section Summary
Link to this section Functions
Specs
config() :: any()
Returns module configuration.
If application environment contains values in Keyword
or Map
struct,
defaults from macro usage will be recursively merged with application configuration.
If one of the configuration parameters does not exist or can not be resolved, raises ArgumentError
.
Specs
handle_call( {:add_api, String.t(), RigInboundGateway.ApiProxy.Api.t()}, any(), state_t() ) :: {:reply, any(), state_t()}
handle_call( {:replace_api, String.t(), RigInboundGateway.ApiProxy.Api.t(), RigInboundGateway.ApiProxy.Api.t()}, any(), state_t() ) :: {:reply, any(), state_t()}
handle_call( {:update_api, String.t(), RigInboundGateway.ApiProxy.Api.t()}, any(), state_t() ) :: {:reply, any(), state_t()}
handle_call( {:deactivate_api, String.t(), RigInboundGateway.ApiProxy.Api.t()}, any(), state_t() ) :: {:reply, atom(), state_t()}
handle_call({:list_apis}, any(), state_t()) :: {:reply, [RigInboundGateway.ApiProxy.Api.t(), ...], state_t()}
handle_call({:get_api}, any(), state_t()) :: {:reply, RigInboundGateway.ApiProxy.Api.t(), state_t()}
Specs
handle_cast( {:handle_join_api, String.t(), RigInboundGateway.ApiProxy.Api.t()}, state_t() ) :: {:noreply, state_t()}
Specs
handle_info(:init_apis, state_t()) :: {:noreply, state_t()}
Specs
handle_join_api(server_t(), String.t(), RigInboundGateway.ApiProxy.Api.t()) :: server_t()
Specs
init(state_t()) :: {:ok, state_t()}
Specs
init_presence(state_t()) :: :ok