Struct garage_util::config::Config
source · [−]pub struct Config {Show 15 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: String,
pub rpc_bind_addr: SocketAddr,
pub rpc_public_addr: Option<SocketAddr>,
pub bootstrap_peers: Vec<(NodeID, SocketAddr)>,
pub consul_host: Option<String>,
pub consul_service_name: Option<String>,
pub sled_cache_capacity: u64,
pub sled_flush_every_ms: u64,
pub s3_api: ApiConfig,
pub s3_web: WebConfig,
}
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: String
RPC secret key: 32 bytes hex encoded
rpc_bind_addr: SocketAddr
Address to bind for RPC
rpc_public_addr: Option<SocketAddr>
Public IP address of this node
bootstrap_peers: Vec<(NodeID, SocketAddr)>
Bootstrap peers RPC address
consul_host: Option<String>
Consul host to connect to to discover more peers
consul_service_name: Option<String>
Consul service name to use
sled_cache_capacity: u64
Sled cache size, in bytes
sled_flush_every_ms: u64
Sled flush interval in milliseconds
s3_api: ApiConfig
Configuration for S3 api
s3_web: WebConfig
Configuration for serving files as normal web server
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Config
impl UnwindSafe for Config
Blanket Implementations
Mutably borrows from an owned value. Read more