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(): void
Shutdown the external service.
Returns
void
Implementation of
ExternalService.shutdown
subscribe()
subscribe(
resource,
params,
callbacks): void
Subscribe to a resource provided by the external service.
Parameters
Parameter | Type | Description |
---|---|---|
resource | string | Name of the external resource. |
params | Json | Parameters of the external resource. |
callbacks | { error : (error ) => void ; loading : () => void ; update : (updates , isInitial ) => void ; } | Callbacks to react on error/loading/update. |
callbacks.error | (error ) => void | Error callback. |
callbacks.loading | () => void | Loading callback. |
callbacks.update | (updates , isInitial ) => void | Update callback. |
Returns
void
Implementation of
ExternalService.subscribe
unsubscribe()
unsubscribe(resource, params): void
Unsubscribe from a resource provided by the external service.
Parameters
Parameter | Type | Description |
---|---|---|
resource | string | Name of the external resource. |
params | Json | Parameters 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
.