7 configuration options · available in Rust, Python, Node.js, Java
use opendal::Operator;
let op = Operator::via_iter("goosefs", [
])?;
use opendal::Operator;
let op = Operator::via_iter("goosefs", [
// Root path of this backend.
//
// All operations will happen under this root.
// Default to `/` if not set.
// ("root".to_string(), "...".to_string()),
// Master address(es) in `host:port` format.
//
// For single master: `"10.0.0.1:9200"`
// For HA (comma-separated): `"10.0.0.1:9200,10.0.0.2:9200,10.0.0.3:9200"`
//
// When multiple addresses are provided, the client uses
// `PollingMasterInquireClient` to discover the Primary Master automatically.
//
// Resolution precedence at `build()` time (highest → lowest), following
// `goosefs-sdk` `docs/CLIENT_CONFIGURATION.md` §1:
// 1. This field (when set on the builder / OpenDAL config map)
// 2. `GOOSEFS_MASTER_ADDR` environment variable
// 3. `goosefs.master.rpc.addresses` / `goosefs.master.hostname` in
// `goosefs-site.properties`
//
// `build()` fails with `ConfigInvalid` only when **none** of the above
// supplies a master address.
// ("master_addr".to_string(), "...".to_string()),
// Block size in bytes for new files (default: 64 MiB).
// ("block_size".to_string(), "1000".to_string()),
// Chunk size in bytes for streaming RPCs (default: 1 MiB).
// ("chunk_size".to_string(), "1000".to_string()),
// Default write type for new files.
//
// Supported values: `"must_cache"`, `"cache_through"`, `"through"`, `"async_through"`.
// Default: `"must_cache"`.
// ("write_type".to_string(), "...".to_string()),
// Authentication type.
//
// Supported values: `"nosasl"`, `"simple"`.
// Default: `"simple"` — PLAIN SASL with username.
// `"nosasl"` — skip authentication entirely.
// ("auth_type".to_string(), "...".to_string()),
// Authentication username.
//
// Used in SIMPLE mode as the login identity.
// Default: current OS user (`$USER` / `$USERNAME`).
// ("auth_username".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 |
|---|---|---|---|
root | string | no | Root path of this backend.
All operations will happen under this root.
Default to / if not set. |
master_addr | string | no | Master address(es) in host:port format.
For single master: "10.0.0.1:9200"
For HA (comma-separated): "10.0.0.1:9200,10.0.0.2:9200,10.0.0.3:9200"
When multiple addresses are provided, the client uses
PollingMasterInquireClient to discover the Primary Master automatically.
Resolution precedence at build() time (highest → lowest), following
goosefs-sdk docs/CLIENT_CONFIGURATION.md §1:
1. This field (when set on the builder / OpenDAL config map)
2. GOOSEFS_MASTER_ADDR environment variable
3. goosefs.master.rpc.addresses / goosefs.master.hostname in
goosefs-site.properties
build() fails with ConfigInvalid only when **none** of the above
supplies a master address. |
block_size | integer | no | Block size in bytes for new files (default: 64 MiB). |
chunk_size | integer | no | Chunk size in bytes for streaming RPCs (default: 1 MiB). |
write_type | string | no | Default write type for new files.
Supported values: "must_cache", "cache_through", "through", "async_through".
Default: "must_cache". |
auth_type | string | no | Authentication type.
Supported values: "nosasl", "simple".
Default: "simple" — PLAIN SASL with username.
"nosasl" — skip authentication entirely. |
auth_username | string | no | Authentication username.
Used in SIMPLE mode as the login identity.
Default: current OS user ($USER / $USERNAME). |