GoogleCloudStorage

Used to set configuration options for an Google Cloud Storage Object Store, which can be used as implementation of an object store.

Requires at least projectId, a bucket and a pubSubTopic to be provided - these will need to be accessible to whichever authentication credentials you use. Authentication is handled via Google’s "Application Default Credentials" - see the relevant documentation to get set up. You will need to set up authentication using any of the methods listed within the documentation to be able to make use of the operations inside the modules.

For more info on setting up the necessary infrastructure on Google Cloud to be able to use Google Cloud Storage as an XTDB object store, see the section on setting up the Google Cloud Deployment Manager Configuration within our Google Cloud docs.

Example usage, as part of a node config:

Xtdb.openNode {
remoteStorage(
objectStore = googleCloudStorage(
projectId = "xtdb-project",
bucket ="xtdb-bucket",
pubSubTopic = "xtdb-bucket-topic"
) {
prefix = Path.of("my/custom/prefix")
},
localDiskCache = Paths.get("test-path")
),
...
}

Types

Link copied to clipboard
@Serializable
@SerialName(value = "!GoogleCloud")
data class Factory(val projectId: String, val bucket: String, val pubSubTopic: String, var prefix: Path? = null) : ObjectStoreFactory

Functions

Link copied to clipboard
fun googleCloudStorage(projectId: String, bucket: String, pubSubTopic: String, configure: GoogleCloudStorage.Factory.() -> Unit = {}): GoogleCloudStorage.Factory

Used to set configuration options for an Google Cloud Storage Object Store, which can be used as implementation of an object store.