macula_gateway_rpc (macula v0.20.5)
View SourceRPC Handler GenServer - manages RPC handler registration and call routing.
Responsibilities: - Register/unregister RPC handlers for procedures - Route RPC calls to registered handlers - Handle call/response matching - Monitor handler processes for automatic cleanup
Extracted from macula_gateway.erl (Phase 4)
Summary
Functions
Make an RPC call to a procedure.
Get the handler for a procedure.
Handle handler process death - automatic cleanup.
Invoke a handler directly for local calls. If handler is a function, invokes it directly. If handler is a PID, sends rpc_call message and waits for response.
List all registered handlers.
Register a handler for an RPC procedure. Handler can be either a PID or a function.
Start the RPC handler with options.
Stop the RPC handler.
Unregister a handler for an RPC procedure.
Functions
Make an RPC call to a procedure.
Get the handler for a procedure.
Handle handler process death - automatic cleanup.
Invoke a handler directly for local calls. If handler is a function, invokes it directly. If handler is a PID, sends rpc_call message and waits for response.
List all registered handlers.
Register a handler for an RPC procedure. Handler can be either a PID or a function.
Start the RPC handler with options.
-spec stop(pid()) -> ok.
Stop the RPC handler.
Unregister a handler for an RPC procedure.