10 releases

0.0.9 Nov 7, 2024
0.0.8 Oct 23, 2024
0.0.7 Sep 18, 2024
0.0.6 Aug 29, 2024
0.0.0 Jun 21, 2024

#208 in HTTP server

Download history 141/week @ 2024-08-16 95/week @ 2024-08-23 50/week @ 2024-08-30 138/week @ 2024-09-13 39/week @ 2024-09-20 23/week @ 2024-09-27 10/week @ 2024-10-04 157/week @ 2024-10-18 31/week @ 2024-10-25 80/week @ 2024-11-01 41/week @ 2024-11-08 5/week @ 2024-11-15 2/week @ 2024-11-22 8/week @ 2024-11-29

132 downloads per month

Apache-2.0

3MB
62K SLoC

Apache OpenDAL™ unftp Integration

Build Status Latest Version Crate Downloads chat

unftp-sbe-opendal is an unftp StorageBackend implementation using opendal.

This crate can help you to access ANY storage services with the same ftp API.

Examples

use anyhow::Result;
use opendal::Operator;
use opendal::Scheme;
use opendal::services;
use unftp_sbe_opendal::OpendalStorage;

#[tokio::main]
async fn main() -> Result<()> {
    // Create any service desired
    let op = opendal::Operator::from_map::<services::S3>(
        [
            ("bucket".to_string(), "my_bucket".to_string()),
            ("access_key".to_string(), "my_access_key".to_string()),
            ("secret_key".to_string(), "my_secret_key".to_string()),
            ("endpoint".to_string(), "my_endpoint".to_string()),
            ("region".to_string(), "my_region".to_string()),
        ]
            .into_iter()
            .collect(),
    )?.finish();

    // Wrap the operator with `OpendalStorage`
    let backend = OpendalStorage::new(op);

    // Build the actual unftp server
    let server = libunftp::ServerBuilder::new(Box::new(move || backend.clone())).build()?;

    // Start the server
    server.listen("0.0.0.0:0").await?;

    Ok(())
}

Branding

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.

License and Trademarks

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.

Dependencies

~26–39MB
~704K SLoC