Function openBackendService
- openBackendService<ServiceName extends keyof BackendServices>(
name1: ServiceName,
args?: unknown[],
options?: BackendServiceOptions,
): Promise<GetBackendServiceInterface<ServiceName>>Type Parameters
- ServiceName extends keyof BackendServices
Parameters
- name1: ServiceName
Optional
args: unknown[]Optional
options: BackendServiceOptions
Returns Promise<GetBackendServiceInterface<ServiceName>>
- openBackendService<Service extends object>(
name: string,
args?: unknown[],
options?: BackendServiceOptions,
): Promise<ConvertToClientInterface<Service>>Type Parameters
- Service extends object
Parameters
- name: string
Optional
args: unknown[]Optional
options: BackendServiceOptions
Returns Promise<ConvertToClientInterface<Service>>
Open a WebHare backend service
Param: name
Service name (a module:service pair). Add this name to the BackendServices interface for automatic service type discovery
Param: args
Arguments to pass to the constructor
Param: options
timeout: Maximum time to wait for the service to come online in msecs (default: 30sec) linger: If true, service requires an explicit close() and will keep the process running
Type Param: Service
Type definition of the service class that implements this service.