The cluster interface.

interface ICluster {
    on: ClusterOnFunction;
    getExternalStorageConnections(strategy?: ((item: IExternalStorageConnection) => boolean)): IExternalStorageConnection[];
    getGenerativeAIContexts(strategy?: ((item: IGenerativeAIContext) => boolean)): IGenerativeAIContext[];
    getGenerativeAIWorkers(strategy?: ((item: IGenerativeAIWorker) => boolean)): IGenerativeAIWorker[];
    getGraphDatabases(strategy?: ((item: IGraphDatabase) => boolean)): IGraphDatabase[];
    getKeyValueDatabases(strategy?: ((item: IKeyValueDatabase) => boolean)): IKeyValueDatabase[];
    getLocalMediaStreams(strategy?: ((item: ILocalMediaStream) => boolean)): ILocalMediaStream[];
    getLocalNode(): LocalNode;
    getObjectStoreBuckets(strategy?: ((item: IObjectStoreBucket) => boolean)): IObjectStoreBucket[];
    getPubSubTopics(strategy?: ((item: IPubSubTopic<unknown>) => boolean)): IPubSubTopic<unknown>[];
    getRemoteMediaStreams(strategy?: ((item: IRemoteMediaStream) => boolean)): IRemoteMediaStream[];
    getRemoteNodes(strategy?: ((item: Node) => boolean)): Node[];
    getVectorDatabases(strategy?: ((item: IVectorDatabase) => boolean)): IVectorDatabase[];
    leave(options?: ISDKCloseOptions): void;
    off(): void;
    off(event: string): void;
    off(events: string[]): void;
    openExternalStorageConnection(name: string, type: SharePoint): Promise<IExternalStorageConnection>;
    openGenerativeAIContext(label: string): Promise<IGenerativeAIContext>;
    openGenerativeAIWorker(label: string): Promise<IGenerativeAIWorker>;
    openGraphDatabase(label: string): IGraphDatabase;
    openKeyValueDatabase(name: string, layout: IDatabaseLayout | ILayoutBuilder): Promise<IKeyValueDatabase>;
    openObjectStoreBucket(name: string, options?: IObjectStoreBucketOptions): Promise<IObjectStoreBucket>;
    openPubSubTopic<T>(name: string): IPubSubTopic<T>;
    openVectorDatabase(label: string): IVectorDatabase;
    publishLocalDynamicMediaStream(label: string, mediaSource: MediaStreamSource): ILocalDynamicMediaStream;
    publishLocalMediaStream(label: string, mediaSource: MediaStreamSource): ILocalMediaStream;
}

Hierarchy (view full)

Properties

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.

Methods

  • Get an array of opened graph databases.

    Parameters

    • Optionalstrategy: ((item: IGraphDatabase) => boolean)

      The strategy to use to filter the graph databases.

    Returns IGraphDatabase[]

  • Get an array of opened pub/sub topics.

    Parameters

    • Optionalstrategy: ((item: IPubSubTopic<unknown>) => boolean)

      The strategy to use to filter the topics.

        • (item): boolean
        • Parameters

          Returns boolean

    Returns IPubSubTopic<unknown>[]

  • Get an array of all connected remote nodes.

    Parameters

    • Optionalstrategy: ((item: Node) => boolean)

      The strategy to use to filter the nodes.

        • (item): boolean
        • Parameters

          Returns boolean

    Returns Node[]

  • Leave the cluster.

    Parameters

    Returns void

  • Unsubscribe from all events on the cluster

    Returns void

  • Unsubscribe to an event.

    Parameters

    • event: string

      The event to unsubscribe from.

    Returns void

  • Unsubscribe from all events, or a specific list of events.

    Parameters

    • events: string[]

      The list of events to unsubscribe from.

    Returns void

  • Open a graph database.

    Parameters

    • label: string

      The label of the graph database.

    Returns IGraphDatabase