Skip to content

//misk-gcp/misk.cloud.gcp.storage

Package-level declarations

Types

Name Summary
BaseCustomStorageRpc [jvm]
abstract class BaseCustomStorageRpc : StorageRpc
Base for custom storage implementations. Most operations on custom storage are unsupported; only those minimal methods requiring implementation are left abstract.
LocalStorageConfig [jvm]
data class LocalStorageConfig(val data_dir: String)
Configuration for local (emulated) storage
LocalStorageRpc [jvm]
class LocalStorageRpc@JvmOverloadsconstructor(root: Path, moshi: Moshi = defaultKotlinMoshi) : BaseCustomStorageRpc
Implementation of StorageRpc that is backed by local disk storage. Useful for running in development mode on local machines, since there is no GCS emulator available. Files are stored with the generation version appended as an extension suffix, with a symlink existing for the latest generation. To preserve GCS atomicity semantics, progressive uploads are handled by storing the interim uploaded data in a temporary file based off the latest generation, then doing a rename to the new generation once the upload is complete.
StorageConfig [jvm]
data class StorageConfig@JvmOverloadsconstructor(val use_local_storage: Boolean = false, val local_storage: LocalStorageConfig? = null, val transport: TransportConfig = TransportConfig()) : Config
Configuration for talking to Google Cloud Storage

Properties

Name Summary
blobIds [jvm]
val Page<Blob>.blobIds: List<BlobId>

Functions

Name Summary
compareTo [jvm]
fun BlobId.compareTo(other: BlobId): Int
forEachChunk [jvm]
fun ReadChannel.forEachChunk(buffer: ByteBuffer, action: (ByteBuffer, Int) -> Unit)
Runs the given block for each chunk on a given channel
[jvm]
fun ReadChannel.forEachChunk(chunkSize: Int, action: (ByteBuffer, Int) -> Unit)
toList [jvm]
fun <T> Page<T>.toList(): List<T>
withLock [jvm]
fun <T> FileChannel.withLock(shared: Boolean, action: () -> T): T