@aster-rpc/aster API Reference
    Preparing search index...

    Function Rpc

    Mark a method as a unary RPC.

    • Mark a method as a unary RPC (single request, single response).

      Parameters

      • Optionaloptions: RpcOptions

      Returns <T extends (...args: any[]) => any>(
          target: T,
          _context: ClassMethodDecoratorContext,
      ) => T

      @Rpc({ timeout: 30, idempotent: true })
      async getUser(req: GetUserRequest): Promise<User> { ... }