The blobstore interface abstracts a service (capability provider) that can manage containers and objects. Actors that use this interface must have the capability contract wasmcloud:blobstore
in their claims list (wash claims sign --blob_store
).
The following is a list of implementations of the wasmcloud:blobstore
contract. Feel free to submit a PR adding your implementation if you have a community/open source version.
| Name | Vendor | Description | | :--- | :---: | :--- | | blobstore-s3 | wasmCloud | An AWS S3 implementation of a blobstore that manages S3 buckets and objects | blobstore-fs | wasmCloud | An implementation that manages folders and files on a filesystem
Create a container in a blobstore: ```rust use std::result::Result; use wasmbusrpc::actor::prelude::*; use wasmcloudinterfaceblobstore::{Blobstore, BlobstoreSender}; async fn createcontainer(ctx: &Context, containername: &str) -> Result<(), RpcError> { let blobstore = BlobstoreSender::new(); blobstore .createcontainer(ctx, &containername.tostring()) .await }
Uploading an object (image bytes) to a blobstore:
rust
use std::result::Result;
use wasmbusrpc::actor::prelude::*;
use wasmcloudinterfaceblobstore::{
Blobstore, BlobstoreSender, Chunk, PutObjectRequest, PutObjectResponse,
};
async fn uploadbytes(ctx: &Context, imagebytes: &[u8]) -> Result