SkipExternalService
An external Skip reactive service.
SkipExternalService provides an implementation of ExternalService for an external Skip service.
Implements
- ExternalService
Constructors
new SkipExternalService()
new SkipExternalService(url, control_url): SkipExternalService
Parameters
| Parameter | Type | Description | 
|---|---|---|
| url | string | URL to use for the service's streaming interface. | 
| control_url | string | URL to use for the service's control interface. | 
Returns
Methods
shutdown()
shutdown(): Promise<void>
Shutdown the external service.
Returns
Promise<void>
Implementation of
ExternalService.shutdown
subscribe()
subscribe(
   instance, 
   resource, 
   params, 
   callbacks): Promise<void>
Subscribe to a resource provided by the external service.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| instance | string | Instance identifier of the external resource. | 
| resource | string | Name of the external resource. | 
| params | Json | Parameters of the external resource. | 
| callbacks | { error: (error) =>void;update: (updates,isInitial) =>Promise<void>; } | Callbacks to react on error/update. | 
| callbacks.error | ( error) =>void | Error callback to log the error that prevent an idermetiate update. | 
| callbacks.update | ( updates,isInitial) =>Promise<void> | Update callback. | 
Returns
Promise<void>
Implementation of
ExternalService.subscribe
unsubscribe()
unsubscribe(instance): void
Unsubscribe from a resource provided by the external service.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| instance | string | Instance identifier of the external resource. | 
Returns
void
Implementation of
ExternalService.unsubscribe
direct()
static direct(entrypoint): SkipExternalService
Constructor accepting an Entrypoint.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| entrypoint | Entrypoint | The entry point for the external Skip service. | 
Returns
An ExternalService to interact with the service running at entrypoint.