Allows listening to events published on the cluster.
Any of the events defined in IClusterEvents.
One of the events defined in IClusterEvents.
The callback when the event is received. Listeners' payload are defined in IClusterEvents.
Get an array of opened external storage connections.
Optional
strategy: ((item: IExternalStorageConnection) => boolean)The strategy to use to filter the external storage connections.
Get an array of opened generative AI contexts.
Optional
strategy: ((item: IGenerativeAIContext) => boolean)The strategy to use to filter the job dispatchers.
Get an array of opened generative AI workers.
Optional
strategy: ((item: IGenerativeAIWorker) => boolean)The strategy to use to filter the job workers.
Get an array of opened graph databases.
Optional
strategy: ((item: IGraphDatabase) => boolean)The strategy to use to filter the graph databases.
Get an array of opened key-value databases.
Optional
strategy: ((item: IKeyValueDatabase) => boolean)The strategy to use to filter the key-value databases.
Get an array of published local media streams.
Optional
strategy: ((item: ILocalMediaStream) => boolean)The strategy to use to filter the media streams.
Get an array of opened object store buckets.
Optional
strategy: ((item: IObjectStoreBucket) => boolean)The strategy to use to filter the data streams.
Get an array of opened pub/sub topics.
Optional
strategy: ((item: IPubSubTopic<unknown>) => boolean)The strategy to use to filter the topics.
Get an array of published remote media streams.
Optional
strategy: ((item: IRemoteMediaStream) => boolean)The strategy to use to filter the media streams.
Get an array of opened vector databases.
Optional
strategy: ((item: IVectorDatabase) => boolean)The strategy to use to filter the vector databases.
Leave the cluster.
Optional
options: ISDKCloseOptionsThe options to close the SDK with.
Unsubscribe from all events on the cluster
Unsubscribe to an event.
The event to unsubscribe from.
Unsubscribe from all events, or a specific list of events.
The list of events to unsubscribe from.
Open an external storage connection.
The name of the external storage connection.
The type of the external storage connection.
The external storage connection.
SDKClientErrorCodes.ExternalStorageConnectionAlreadyExists if the external storage connection is already open.
SDKClientErrorCodes.ExternalStorageConnectionNameNotString if the name is not a string.
Open a generative AI context.
The label of the generative AI context.
Open a generative AI worker.
The label of the generative AI Worker.
Open a graph database.
The label of the graph database.
Open a key-value database.
The name of the key-value database.
The layout of the key-value database.
A promise that resolves with the key-value database.
SDKClientErrorCodes.KeyValueDatabaseAlreadyExists if the key-value database is already open.
SDKClientErrorCodes.KeyValueDatabaseInvalidLayout if the layout is invalid.
SDKClientErrorCodes.KeyValueDatabaseNameNotString if the name is not a string.
Open a object store bucket.
The name of the Object Store bucket.
Optional
options: IObjectStoreBucketOptionsThe options of the Object Store bucket.
A promise that resolves with the data stream.
SDKClientErrorCodes.ObjectStoreAlreadyExists if the data stream is already open.
SDKClientErrorCodes.ObjectStoreNameNotString if the name is not a string.
Open a pub/sub topic.
The name of the PubSub Topic.
The pub/sub topic.
SDKClientErrorCodes.PubSubTopicAlreadyExists if the topic already exists
SDKClientErrorCodes.PubSubTopicNameNotString if the name is not a string.
Open a vector database.
The label of the vector database.
Publish a local dynamic media stream. Like a local media stream but can be modified after creation.
The label of the media stream.
The media source to publish.
The local dynamic media stream.
SDKClientErrorCodes.LocalMediaStreamAlreadyExists if the media stream is already published.
Publish a local media stream.
The label of the media stream.
The media source to publish.
The local media stream.
SDKClientErrorCodes.LocalMediaStreamAlreadyExists if the media stream is already published.
The cluster interface.