Skip to main content

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​

ParameterTypeDescription
urlstringURL to use for the service's streaming interface.
control_urlstringURL to use for the service's control interface.

Returns​

SkipExternalService

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​

ParameterTypeDescription
instancestringInstance identifier of the external resource.
resourcestringName of the external resource.
paramsJsonParameters of the external resource.
callbacks{ error: (error) => void; update: (updates, isInitial) => Promise<void>; }Callbacks to react on error/update.
callbacks.error(error) => voidError 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​

ParameterTypeDescription
instancestringInstance identifier of the external resource.

Returns​

void

Implementation of​

ExternalService.unsubscribe

direct()​

static direct(entrypoint): SkipExternalService

Constructor accepting an Entrypoint.

Parameters​

ParameterTypeDescription
entrypointEntrypointThe entry point for the external Skip service.

Returns​

SkipExternalService

An ExternalService to interact with the service running at entrypoint.