Skip to main content

Class: GcpBlobStorageConnector

Class for performing blob storage operations on GCP Storage. See https://cloud.google.com/storage/docs/reference/libraries for more information.

Implements​

  • IBlobStorageConnector
  • IHealthProviderComponent

Constructors​

Constructor​

new GcpBlobStorageConnector(options): GcpBlobStorageConnector

Create a new instance of GcpBlobStorageConnector.

Parameters​

options​

IGcpBlobStorageConnectorConstructorOptions

The options for the connector.

Returns​

GcpBlobStorageConnector

Properties​

NAMESPACE​

readonly static NAMESPACE: string = "gcp"

The namespace for the items.


CLASS_NAME​

readonly static CLASS_NAME: string

Runtime name for the class.

Methods​

className()​

className(): string

Returns the class name of the component.

Returns​

string

The class name of the component.

Implementation of​

IBlobStorageConnector.className


health()​

health(): Promise<IHealth[]>

Returns the health status of the component.

Returns​

Promise<IHealth[]>

The health status of the component.

Implementation of​

IHealthProviderComponent.health


bootstrap()​

bootstrap(nodeLoggingComponentType?): Promise<boolean>

Bootstrap the component by creating and initializing any resources it needs.

Parameters​

nodeLoggingComponentType?​

string

The node logging component type.

Returns​

Promise<boolean>

True if the bootstrapping process was successful.

Implementation of​

IBlobStorageConnector.bootstrap


set()​

set(blob): Promise<string>

Set the blob.

Parameters​

blob​

Uint8Array

The data for the blob.

Returns​

Promise<string>

The id of the stored blob in urn format.

Implementation of​

IBlobStorageConnector.set


get()​

get(id): Promise<Uint8Array<ArrayBufferLike> | undefined>

Get the blob.

Parameters​

id​

string

The id of the blob to get in urn format.

Returns​

Promise<Uint8Array<ArrayBufferLike> | undefined>

The data for the blob if it can be found or undefined.

Implementation of​

IBlobStorageConnector.get


teardown()​

teardown(nodeLoggingComponentType?): Promise<boolean>

Teardown the component and remove any resources it created.

Parameters​

nodeLoggingComponentType?​

string

The node logging component type.

Returns​

Promise<boolean>

True if the teardown process was successful.

Implementation of​

IBlobStorageConnector.teardown


empty()​

empty(): Promise<void>

Remove all blobs from the storage.

Returns​

Promise<void>

A promise that resolves when all blobs in the current partition have been removed.

Implementation of​

IBlobStorageConnector.empty


remove()​

remove(id): Promise<boolean>

Remove the blob.

Parameters​

id​

string

The id of the blob to remove in urn format.

Returns​

Promise<boolean>

True if the blob was found.

Implementation of​

IBlobStorageConnector.remove