Module MountainVinegRPCService

Module MountainVinegRPCService 

Source
Expand description

§MountainVinegRPCService

Defines the gRPC service implementation for Mountain. This struct handles incoming RPC calls from the Cocoon sidecar, dispatches them to the application’s core logic via the Track module, and returns the results.

§Service Methods

  • process_cocoon_request: Handles request-response calls from Cocoon
  • send_cocoon_notification: Handles fire-and-forget notifications from Cocoon
  • cancel_operation: Cancels long-running operations requested by Cocoon

§Request Processing

  1. Deserialize JSON parameters from request
  2. Validate method name and parameters
  3. Dispatch request to Track::DispatchLogic
  4. Serialize response or error
  5. Return gRPC response with proper status codes

§Error Handling

All errors are converted to JSON-RPC compliant Error objects:

  • Parse errors: code -32700
  • Server errors: code -32000
  • Method not found: code -32601
  • Invalid params: code -32602

§Security

  • Parameter validation before processing
  • Message size limits enforced
  • Method name sanitization
  • Safe error messages (no sensitive data)

Modules§

ServiceConfig 🔒
Configuration for MountainService

Structs§

MountainVinegRPCService
The concrete implementation of the MountainService gRPC service.