Skip to main content

etcd

7 configuration options · available in Rust, Python, Node.js, Java

Quick start
use opendal::Operator;

let op = Operator::via_iter("etcd", [
])?;
All configuration options (copy & trim)
Full reference
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.

Configuration reference

General7
KeyTypeRequiredDescription
endpointsstringnonetwork 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"
usernamestringnothe username to connect etcd service. default is None
passwordstringnothe password for authentication default is None
rootstringnothe working directory of the etcd service. Can be "/path/to/dir" default is "/"
ca_pathstringnocertificate authority file path default is None
cert_pathstringnocert path default is None
key_pathstringnokey path default is None