Skip to main content

etcd

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

Quick start
use opendal::Operator;

let operator = Operator::via_iter("etcd", [
])?;
All configuration options (copy & trim)
Full reference
use opendal::Operator;

let operator = Operator::via_iter("etcd", [
// network address of the Etcd services.
// Use HTTPS endpoints for TLS. Set `ca_path` to trust a custom certificate authority.
// Client authentication additionally requires both `cert_path` and `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()),

// PEM certificate authority file used to verify the server.
// Enables TLS independently of `cert_path` and `key_path`.
//
// default is None
// ("ca_path".to_string(), "...".to_string()),

// PEM client certificate file used for mutual TLS.
// Must be configured together with `key_path`.
//
// default is None
// ("cert_path".to_string(), "...".to_string()),

// PEM client private key file used for mutual TLS.
// Must be configured together with `cert_path`.
//
// default is None
// ("key_path".to_string(), "...".to_string()),

// the maximum size in bytes of a gRPC response that the etcd client decodes.
//
// Set this to read values larger than the etcd client's own limit. The etcd
// server must also allow responses of that size.
//
// Refer to [`etcd_client::KvClient::max_decoding_message_size`](https://docs.rs/etcd-client/latest/etcd_client/struct.KvClient.html#method.max_decoding_message_size)
//
// default is None, which keeps the etcd client default of 4 MiB
// ("max_decoding_message_size".to_string(), "1000".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

General8
KeyTypeRequiredDescription
endpointsstringnonetwork address of the Etcd services. Use HTTPS endpoints for TLS. Set ca_path to trust a custom certificate authority. Client authentication additionally requires both cert_path and 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_pathstringnoPEM certificate authority file used to verify the server. Enables TLS independently of cert_path and key_path. default is None
cert_pathstringnoPEM client certificate file used for mutual TLS. Must be configured together with key_path. default is None
key_pathstringnoPEM client private key file used for mutual TLS. Must be configured together with cert_path. default is None
max_decoding_message_sizeintegernothe maximum size in bytes of a gRPC response that the etcd client decodes. Set this to read values larger than the etcd client's own limit. The etcd server must also allow responses of that size. Refer to [etcd_client::KvClient::max_decoding_message_size](https://docs.rs/etcd-client/latest/etcd_client/struct.KvClient.html#method.max_decoding_message_size) default is None, which keeps the etcd client default of 4 MiB