PhoenixGenApi.Structs.FunConfig (PhoenixGenApi v0.0.1)
View SourceSummary
Functions
Config struct for external request. Request after receive from client will check config and forward to target service.
Check permission for request from client.
Validate & Convert request arguments to the correct types.
Select target based on config.
Check if the service is local (run on the same node).
Validate request arguments.
Functions
Config struct for external request. Request after receive from client will check config and forward to target service.
Example
%FunConfig{
request_type: "get_user",
service: :user,
nodes: ["user1", "user2"],
choose_node_mode: :random,
timeout: 1000,
mfa: {User, :get_user, []},
arg_types: %{
"user_id" => :string,
"device_id" => :string,
},
arg_orders: ["user_id", "device_id"],
response_type: :async,
}
Check permission for request from client.
Validate & Convert request arguments to the correct types.
Select target based on config.
Check if the service is local (run on the same node).
Validate request arguments.