Skip to main content

FoundationDB

FoundationDB services support.

Capabilities

This service can be used to:

  • stat
  • read
  • write
  • create_dir
  • delete
  • copy
  • rename
  • list
  • scan
  • presign
  • blocking

Note: As for Known Limitations - FoundationDB, keys cannot exceed 10,000 bytes in size, and values cannot exceed 100,000 bytes in size. Errors will be raised by OpenDAL if these limits are exceeded.

Configuration

  • root: Set the work directory for this backend.
  • config_path: Set the configuration path for foundationdb. If not provided, the default configuration path will be used.

You can refer to [FoundationdbBuilder]'s docs for more information

Example

Via Builder

use anyhow::Result;
use opendal::services::Foundationdb;
use opendal::Operator;

#[tokio::main]
async fn main() -> Result<()> {
let mut builder = Foundationdb::default();
builder.config_path("/etc/foundationdb/foundationdb.conf");

let op: Operator = Operator::new(builder)?.finish();
Ok(())
}

Via Config

use anyhow::Result;
use opendal::Operator;
use opendal::Scheme;
use std::collections::HashMap;

#[tokio::main]
async fn main() -> Result<()> {
let mut map = HashMap::new();
map.insert("root".to_string(), "/path/to/dir".to_string());
map.insert("config_path".to_string(), "/path/to/config".to_string());

let op: Operator = Operator::via_map(Scheme::Foundationdb, map)?;
Ok(())
}