Crate zksync_object_store

Source
Expand description

This crate provides the object storage abstraction that allows to get, put and remove binary blobs. The following implementations are available:

Normally, these implementations are not used directly. Instead, a store trait object (Arc<dyn ObjectStore>) can be constructed using an ObjectStoreFactory based on the configuration. This trait object is what should be used for dependency injection.

Besides the lower-level storage abstraction, the crate provides high-level typesafe <dyn ObjectStore>::get() and <dyn ObjectStore>::put() methods to store (de)serializable objects. Prefer using these methods whenever possible.

Re-exports§

pub use bincode;

Macros§

serialize_using_bincode
Derives StoredObject::serialize() and StoredObject::deserialize() using the bincode (de)serializer. Should be used in impl StoredObject blocks.

Structs§

FileBackedObjectStore
ObjectStore implementation storing objects as files in a local filesystem. Mostly useful for local testing.
GoogleCloudStore
ObjectStore implementation based on GCS.
MockObjectStore
Mock ObjectStore implementation.
ObjectStoreFactory
Factory of ObjectStores that caches the store instance once it’s created. Used mainly for legacy reasons.

Enums§

Bucket
Bucket for ObjectStore in which objects can be placed.
GoogleCloudStoreAuthMode
Authentication mode for GoogleCloudStore.
ObjectStoreError
Errors during ObjectStore operations.

Traits§

ObjectStore
Functionality to fetch and store byte blobs from an object store (AWS S3, Google Cloud Storage, Azure Blobstore etc).
StoredObject
Object that can be stored in an ObjectStore.