8 configuration options · available in Rust, Java, Python, Node.js, Go
use opendal::Operator;
let operator = Operator::via_iter("etcd", [
])?;
use opendal::Operator;
let operator = 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()),
// 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.
| 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 |
max_decoding_message_size | integer | no | 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 |