new Registry(transport, registryUri, cache)
Parameters:
Name | Type | Description |
---|---|---|
transport |
Transport | Transport instance to use for fetching |
registryUri |
string | URI of the Sequoia registry e.g. https://registry-reference.sequoia.piksel.com |
cache |
boolean | Indicate wether or not to cache descriptors |
- Source:
Properties:
Name | Type | Description |
---|---|---|
registryUri |
string | URI of the Sequoia registry e.g. https://registry-reference.sequoia.piksel.com |
services |
Array.<Object> | Services available in the environment |
descriptors |
Object | JSON data returned from the service's raw description e.g. https://metadata-reference.sequoia.piksel.com/descriptor/raw?owner=demo |
tenant |
string | The name of the current tenancy being used e.g. 'demo' See the Registry docs for more info |
Methods
-
fetch(tenant)
-
Fetch the registry for this user in this tenancy
Parameters:
Name Type Description tenant
string The name of the tenancy to use e.g. 'demo'
- Source:
Returns:
- Type
- Promise
-
getCachedServiceDescriptor(serviceName)
-
Get ServiceDescriptor information from the SDK cache.
Rejects the Promise if a service is requested that doesn't exist for this user (or at all), or if the descriptor is not in the cache
Parameters:
Name Type Description serviceName
string The name of the service to use e.g. 'metadata'
- Source:
Returns:
- Type
- Promise
-
getCachedServiceDescriptors(serviceName)
-
Get multiple ServiceDescriptor information from the SDK cache, falling back to the services endpoint.
Rejects the Promise if a service is requested that doesn't exist for this user (or at all)
Parameters:
Name Type Argument Description serviceName
string <repeatable>
The name of the service to use e.g. 'metadata'
- Source:
Returns:
- Type
- Promise
-
getService(serviceName)
-
Get ServiceDescriptor information from the registry.
Parameters:
Name Type Description serviceName
string The name of the service to use e.g. 'metadata'
- Deprecated:
-
- Deprecated since 1.2.0. Use Registry#getServiceDescriptor Rejects the Promise if a service is requested that doesn't exist for this user (or at all)
- Source:
Returns:
- Type
- Promise
-
getServiceDescriptor(serviceName)
-
Get ServiceDescriptor information from the registry.
Rejects the Promise if a service is requested that doesn't exist for this user (or at all)
Parameters:
Name Type Description serviceName
string The name of the service to use e.g. 'metadata'
- Source:
Returns:
- Type
- Promise
-
getServiceDescriptors(serviceName)
-
Get multiple ServiceDescriptor information from the services endpoints.
Rejects the Promise if a service is requested that doesn't exist for this user (or at all)
Parameters:
Name Type Argument Description serviceName
string <repeatable>
The name of the service to use e.g. 'metadata'
- Source:
Returns:
- Type
- Promise
-
getServices(serviceName)
-
Get multiple ServiceDescriptor information from the registry.
- @deprecated Deprecated since 1.2.0. Use Registry#getServiceDescriptors
Rejects the Promise if a service is requested that doesn't exist for this user (or at all)
Parameters:
Name Type Argument Description serviceName
string <repeatable>
The name of the service to use e.g. 'metadata'
- Source:
Returns:
- Type
- Promise
-
refreshServices()
-
Refresh services that are cached inside the SDK.
- Source:
Returns:
- Type
- Promise