ModuleRpcProtocolServer

This module provides a simplified interface for instantiating an RPC server. Under the hood, it is a thin wrapper around ModuleRpcProtocolGrpcWebServer.registerGrpcWebRoutes, and it provides a gRPC-Web transportation protocol with JSON encoding/decoding. Other protocols could be offered here in the future, and registerRpcRoutes would be used to easily choose between them.

see

ModuleRpcProtocolClient

license

Copyright (c) Aiden.ai

This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

Index

Interfaces

Functions

Functions

registerRpcRoutes

  • registerRpcRoutes<serviceDefinition>(serviceDefinition: serviceDefinition, serviceHandler: ModuleRpcServer.ServiceHandlerFor<serviceDefinition>, options?: RpcServerOptions): Router
  • registerRpcRoutes<serviceDefinition, RequestContext>(serviceDefinition: serviceDefinition, serviceHandler: ModuleRpcServer.ServiceHandlerFor<serviceDefinition, RequestContext>, options: RpcServerOptions & object): Router