Struct garage_util::config::Config
source · pub struct Config {Show 21 fields
pub metadata_dir: PathBuf,
pub data_dir: PathBuf,
pub block_size: usize,
pub replication_mode: String,
pub compression_level: Option<i32>,
pub rpc_secret: Option<String>,
pub rpc_secret_file: Option<String>,
pub rpc_bind_addr: SocketAddr,
pub rpc_public_addr: Option<String>,
pub rpc_ping_timeout_msec: Option<u64>,
pub rpc_timeout_msec: Option<u64>,
pub bootstrap_peers: Vec<String>,
pub consul_discovery: Option<ConsulDiscoveryConfig>,
pub kubernetes_discovery: Option<KubernetesDiscoveryConfig>,
pub db_engine: String,
pub sled_cache_capacity: u64,
pub sled_flush_every_ms: u64,
pub s3_api: S3ApiConfig,
pub k2v_api: Option<K2VApiConfig>,
pub s3_web: Option<WebConfig>,
pub admin: AdminConfig,
}
Expand description
Represent the whole configuration
Fields§
§metadata_dir: PathBuf
Path where to store metadata. Should be fast, but low volume
data_dir: PathBuf
Path where to store data. Can be slower, but need higher volume
block_size: usize
Size of data blocks to save to disk
replication_mode: String
Replication mode. Supported values:
- none, 1 -> no replication
- 2 -> 2-way replication
- 3 -> 3-way replication
compression_level: Option<i32>
Zstd compression level used on data blocks
rpc_secret: Option<String>
RPC secret key: 32 bytes hex encoded
rpc_secret_file: Option<String>
Optional file where RPC secret key is read from
rpc_bind_addr: SocketAddr
Address to bind for RPC
rpc_public_addr: Option<String>
Public IP address of this node
rpc_ping_timeout_msec: Option<u64>
Timeout for Netapp’s ping messagess
rpc_timeout_msec: Option<u64>
Timeout for Netapp RPC calls
bootstrap_peers: Vec<String>
Bootstrap peers RPC address
consul_discovery: Option<ConsulDiscoveryConfig>
Configuration for automatic node discovery through Consul
kubernetes_discovery: Option<KubernetesDiscoveryConfig>
Configuration for automatic node discovery through Kubernetes
db_engine: String
Database engine to use for metadata (options: sled, sqlite, lmdb)
sled_cache_capacity: u64
Sled cache size, in bytes
sled_flush_every_ms: u64
Sled flush interval in milliseconds
s3_api: S3ApiConfig
Configuration for S3 api
k2v_api: Option<K2VApiConfig>
Configuration for K2V api
s3_web: Option<WebConfig>
Configuration for serving files as normal web server
admin: AdminConfig
Configuration for the admin API endpoint