Expand description
§Objectstore Client
The client is used to interface with the objectstore backend. It handles responsibilities like transparent compression, and making sure that uploads and downloads are done as efficiently as possible.
§Usage
use objectstore_client::ClientBuilder;
#[tokio::main]
let client = ClientBuilder::new("http://localhost:8888/", "my-usecase")?
.for_organization(42);
let id = client.put("hello world").send().await?;
let object = client.get(&id.key).send().await?.expect("object to exist");
assert_eq!(object.payload().await?, "hello world");Structs§
- Client
- A scoped objectstore client that can access objects in a specific use case and scope.
- Client
Builder - Service for storing and retrieving objects.
- GetBuilder
- A GET request builder.
- GetResult
- The result from a successful
get()call. - PutBuilder
- A PUT request builder.
- PutResponse
- The response returned from the service after uploading an object.
Enums§
- Compression
- The compression algorithm of an object to upload.
- Error
- Errors that can happen within the objectstore-client
- Expiration
Policy - The per-object expiration policy
Constants§
- PARAM_
SCOPE - HTTP request query parameter that contains the request scope.
- PARAM_
USECASE - HTTP request query parameter that contains the request usecase.
Type Aliases§
- Client
Stream - The type of
Streamto be used for a PUT request. - Result
- A convenience alias that defaults our
Errortype.