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(): 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

ParameterTypeDescription
resourcestringName of the external resource.
paramsJsonParameters of the external resource.
callbacks{ error: (error) => void; loading: () => void; update: (updates, isInitial) => void; }Callbacks to react on error/loading/update.
callbacks.error(error) => voidError callback.
callbacks.loading() => voidLoading callback.
callbacks.update(updates, isInitial) => voidUpdate callback.

Returns

void

Implementation of

ExternalService.subscribe

unsubscribe()

unsubscribe(resource, params): void

Unsubscribe from a resource provided by the external service.

Parameters

ParameterTypeDescription
resourcestringName of the external resource.
paramsJsonParameters 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.