7 configuration options · available in Rust, Python, Node.js, Java
use opendal::Operator;
let op = Operator::via_iter("etcd", [
])?;
use opendal::Operator;
let op = Operator::via_iter("etcd", [
// network address of the Etcd services.
// If use https, must set TLS options: `ca_path`, `cert_path`, `key_path`.
// e.g. "127.0.0.1:23790,127.0.0.1:23791,127.0.0.1:23792" or "http://127.0.0.1:23790,http://127.0.0.1:23791,http://127.0.0.1:23792" or "https://127.0.0.1:23790,https://127.0.0.1:23791,https://127.0.0.1:23792"
//
// default is "http://127.0.0.1:2379"
// ("endpoints".to_string(), "...".to_string()),
// the username to connect etcd service.
//
// default is None
// ("username".to_string(), "...".to_string()),
// the password for authentication
//
// default is None
// ("password".to_string(), "...".to_string()),
// the working directory of the etcd service. Can be "/path/to/dir"
//
// default is "/"
// ("root".to_string(), "...".to_string()),
// certificate authority file path
//
// default is None
// ("ca_path".to_string(), "...".to_string()),
// cert path
//
// default is None
// ("cert_path".to_string(), "...".to_string()),
// key path
//
// default is None
// ("key_path".to_string(), "...".to_string()),
])?;
Every option is passed as a string key; OpenDAL parses it into the right type. Some services may require building the binding with the matching services-* feature enabled.
| Key | Type | Required | Description |
|---|---|---|---|
endpoints | string | no | network address of the Etcd services.
If use https, must set TLS options: ca_path, cert_path, key_path.
e.g. "127.0.0.1:23790,127.0.0.1:23791,127.0.0.1:23792" or "http://127.0.0.1:23790,http://127.0.0.1:23791,http://127.0.0.1:23792" or "https://127.0.0.1:23790,https://127.0.0.1:23791,https://127.0.0.1:23792"
default is "http://127.0.0.1:2379" |
username | string | no | the username to connect etcd service. default is None |
password | string | no | the password for authentication default is None |
root | string | no | the working directory of the etcd service. Can be "/path/to/dir" default is "/" |
ca_path | string | no | certificate authority file path default is None |
cert_path | string | no | cert path default is None |
key_path | string | no | key path default is None |