Crates.io | opendal_obs |
lib.rs | opendal_obs |
version | |
source | src |
created_at | 2024-11-28 18:40:44.31469 |
updated_at | 2024-11-30 04:50:47.252735 |
description | [FORK]Apache OpenDALâ„¢: Access data freely, painlessly, and efficiently. |
homepage | https://opendal.apache.org/ |
repository | https://github.com/FayeSpica/opendal_obs |
max_upload_size | |
id | 1464872 |
Cargo.toml error: | TOML parse error at line 20, column 1 | 20 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
OpenDAL offers a unified data access layer, empowering users to seamlessly and efficiently retrieve data from diverse storage services.
OpenDAL supports the following storage services:
Type | Services |
---|---|
Standard Storage Protocols | ftp http sftp webdav |
Object Storage Services | azblob cos gcs obs oss s3 b2 openstack_swift upyun vercel_blob |
File Storage Services | fs alluxio azdls azfile chainsafe compfs dbfs gridfs hdfs hdfs_native ipfs webhdfs |
Consumer Cloud Storage Service | aliyun_drive gdrive onedrive dropbox icloud koofr pcloud seafile yandex_disk |
Key-Value Storage Services | cacache cloudflare_kv dashmap memory etcd foundationdb persy redis rocksdb sled redb tikv atomicserver |
Database Storage Services | d1 mongodb mysql postgresql sqlite surrealdb |
Cache Storage Services | ghac memcached mini_moka moka vercel_artifacts |
Git Based Storage Services | huggingface |
OpenDAL supports the following storage layers to extend the behavior:
Name | Depends | Description |
---|---|---|
AsyncBacktraceLayer |
async-backtrace | Add Efficient, logical 'stack' traces of async functions for the underlying services. |
AwaitTreeLayer |
await-tree | Add a Instrument await-tree for actor-based applications to the underlying services. |
BlockingLayer |
tokio | Add blocking API support for non-blocking services. |
ChaosLayer |
rand | Inject chaos into underlying services for robustness test. |
ConcurrentLimitLayer |
tokio | Add concurrent request limit. |
DtraceLayer |
probe | Support User Statically-Defined Tracing(aka USDT) on Linux |
LoggingLayer |
log | Add log for every operations. |
MetricsLayer |
metrics | Add metrics for every operations. |
MimeGuessLayer |
mime_guess | Add Content-Type automatically based on the file extension in the operation path. |
FastraceLayer |
fastrace | Add fastrace for every operations. |
OtelTraceLayer |
opentelemetry::trace | Add opentelemetry::trace for every operations. |
PrometheusClientLayer |
prometheus_client | Add prometheus metrics for every operations. |
PrometheusLayer |
prometheus | Add prometheus metrics for every operations. |
RetryLayer |
backon | Add retry for temporary failed operations. |
ThrottleLayer |
governor | Add a bandwidth rate limiter to the underlying services. |
TimeoutLayer |
tokio | Add timeout for every operations to avoid slow or unexpected hang operations. |
TracingLayer |
tracing | Add tracing for every operations. |
use opendal::Result;
use opendal::layers::LoggingLayer;
use opendal::services;
use opendal::Operator;
#[tokio::main]
async fn main() -> Result<()> {
// Pick a builder and configure it.
let mut builder = services::S3::default();
builder.bucket("test");
// Init an operator
let op = Operator::new(builder)?
// Init with logging layer enabled.
.layer(LoggingLayer::default())
.finish();
// Write data
op.write("hello.txt", "Hello, World!").await?;
// Read data
let bs = op.read("hello.txt").await?;
// Fetch metadata
let meta = op.stat("hello.txt").await?;
let mode = meta.mode();
let length = meta.content_length();
// Delete
op.delete("hello.txt").await?;
Ok(())
}
Name | Description |
---|---|
Basic | Show how to use opendal to operate storage service. |
Concurrent Upload | Show how to perform upload concurrently to a storage service. |
Multipart Upload | Show how to perform a multipart upload to a storage service. |
Check out the CONTRIBUTING guide for more details on getting started with contributing to this project.
The first and most prominent mentions must use the full form: Apache OpenDALâ„¢ of the name for any individual usage (webpage, handout, slides, etc.) Depending on the context and writing style, you should use the full form of the name sufficiently often to ensure that readers clearly understand the association of both the OpenDAL project and the OpenDAL software product to the ASF as the parent organization.
For more details, see the Apache Product Name Usage Guide.
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.