nooberfsh commented on issue #2640:
URL:
https://github.com/apache/incubator-opendal/issues/2640#issuecomment-1702118011
Hi, I wrote a small program to test the compatibility with Kodo, it works
without any problem.
```rust
use opendal::services::S3;
use opendal::Operator;
use opendal::Result;
#[tokio::main]
async fn main() -> Result<()> {
let mut builder = S3::default();
builder.bucket("test");
builder.endpoint("http://s3.cn-east-1.qiniucs.com");
builder.access_key_id("key");
builder.secret_access_key("key");
let op: Operator = Operator::new(builder)?.finish();
write_data(op.clone()).await?;
read_data(op.clone()).await?;
Ok(())
}
async fn write_data(op: Operator) -> Result<()> {
op.write("test", "Hello, World!").await?;
Ok(())
}
async fn read_data(op: Operator) -> Result<()> {
let bs = op.read("test").await?;
println!("data: {}", String::from_utf8_lossy(&bs));
Ok(())
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]