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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.