hero.processor #
enum ErrorReason #
enum ErrorReason {
timeout
serialization_failed
deserialization_failed
enqueue_failed
}
Enum for different error reasons
struct ProcedureCall #
struct ProcedureCall {
pub:
method string // Method name (derived from OpenAPI path)
params string // Parameters for the procedure
}
ProcedureCall struct representing a procedure invocation
struct ProcedureError #
struct ProcedureError {
reason ErrorReason
}
ProcedureError struct for error handling
fn (ProcedureError) code #
fn (err ProcedureError) code() int
fn (ProcedureError) msg #
fn (err ProcedureError) msg() string
struct ProcedureResponse #
struct ProcedureResponse {
pub:
result string // Response data
error string // Internal error message (if any)
}
ProcedureResponse struct representing the result of a procedure call
struct ProcessParams #
@[params]
struct ProcessParams {
pub:
timeout int // Timeout in seconds
}
Parameters for processing a procedure call
struct Processor #
struct Processor {
pub mut:
rpc redisclient.RedisRpc // Redis RPC mechanism
}
Processor struct for managing procedure calls
fn (Processor) process #
fn (mut p Processor) process(call ProcedureCall, params ProcessParams) !ProcedureResponse
Process the procedure call