Enum fdb::NetworkOption
source · [−]#[non_exhaustive]
pub enum NetworkOption {
Show 38 variants
LocalAddress(String),
ClusterFile(String),
TraceEnable(String),
TraceRollSize(i32),
TraceMaxLogsSize(i32),
TraceLogGroup(String),
TraceFormat(String),
TraceClockSource(String),
TraceFileIdentifier(String),
TracePartialFileSuffix(String),
Knob(String),
TLSPlugin(String),
TLSCertBytes(Vec<u8>),
TLSCertPath(String),
TLSKeyBytes(Vec<u8>),
TLSKeyPath(String),
TLSVerifyPeers(Vec<u8>),
BuggifyEnable,
BuggifyDisable,
BuggifySectionActivatedProbability(i32),
BuggifySectionFiredProbability(i32),
TLSCaBytes(Vec<u8>),
TLSCaPath(String),
TLSPassword(String),
DisableMultiVersionClientApi,
CallbacksOnExternalThreads,
ExternalClientLibrary(String),
ExternalClientDirectory(String),
DisableLocalClient,
ClientThreadsPerVersion(i32),
DisableClientStatisticsLogging,
EnableSlowTaskProfiling,
EnableRunLoopProfiling,
ClientBuggifyEnable,
ClientBuggifyDisable,
ClientBuggifySectionActivatedProbability(i32),
ClientBuggifySectionFiredProbability(i32),
DistributedClientTracer(String),
}
Expand description
A set of options that can be set globally for the FDB API.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
LocalAddress(String)
IP:PORT
Deprecated
ClusterFile(String)
path to cluster file
Deprecated
TraceEnable(String)
path to output directory (or NULL for current working directory)
Enables trace output to a file in a directory of the clients choosing
TraceRollSize(i32)
max size of a single trace output file
Sets the maximum size in bytes of a single trace output file. This value should be in the range [0, INT64_MAX]
. If the value is set to 0, there is no limit on individual file size. The default is a maximum size of 10,485,760 bytes.
TraceMaxLogsSize(i32)
max total size of trace files
Sets the maximum size of all the trace output files put together. This value should be in the range [0, INT64_MAX]
. If the value is set to 0, there is no limit on the total size of the files. The default is a maximum size of 104,857,600 bytes. If the default roll size is used, this means that a maximum of 10 trace files will be written at a time.
TraceLogGroup(String)
value of the LogGroup attribute
Sets the ‘LogGroup’ attribute with the specified value for all events in the trace output files. The default log group is ‘default’.
TraceFormat(String)
Format of trace files
Select the format of the log files. xml (the default) and json are supported.
TraceClockSource(String)
Trace clock source
Select clock source for trace files. now (the default) or realtime are supported.
TraceFileIdentifier(String)
The identifier that will be part of all trace file names
Once provided, this string will be used to replace the port/PID in the log file names.
TracePartialFileSuffix(String)
Append this suffix to partially written log files. When a log file is complete, it is renamed to remove the suffix. No separator is added between the file and the suffix. If you want to add a file extension, you should include the separator - e.g. ‘.tmp’ instead of ‘tmp’ to add the ‘tmp’ extension.
Set file suffix for partially written log files.
Knob(String)
knob_name=knob_value
Set internal tuning or debugging knobs
TLSPlugin(String)
file path or linker-resolved name
Deprecated
TLSCertBytes(Vec<u8>)
certificates
Set the certificate chain
TLSCertPath(String)
file path
Set the file from which to load the certificate chain
TLSKeyBytes(Vec<u8>)
key
Set the private key corresponding to your own certificate
TLSKeyPath(String)
file path
Set the file from which to load the private key corresponding to your own certificate
TLSVerifyPeers(Vec<u8>)
verification pattern
Set the peer certificate field verification criteria
BuggifyEnable
BuggifyDisable
BuggifySectionActivatedProbability(i32)
probability expressed as a percentage between 0 and 100
Set the probability of a BUGGIFY section being active for the current execution. Only applies to code paths first traversed AFTER this option is changed.
BuggifySectionFiredProbability(i32)
probability expressed as a percentage between 0 and 100
Set the probability of an active BUGGIFY section being fired
TLSCaBytes(Vec<u8>)
ca bundle
Set the ca bundle
TLSCaPath(String)
file path
Set the file from which to load the certificate authority bundle
TLSPassword(String)
key passphrase
Set the passphrase for encrypted private key. Password should be set before setting the key for the password to be used.
DisableMultiVersionClientApi
Disables the multi-version client API and instead uses the local client directly. Must be set before setting up the network.
CallbacksOnExternalThreads
If set, callbacks from external client libraries can be called from threads created by the FoundationDB client library. Otherwise, callbacks will be called from either the thread used to add the callback or the network thread. Setting this option can improve performance when connected using an external client, but may not be safe to use in all environments. Must be set before setting up the network. WARNING: This feature is considered experimental at this time.
ExternalClientLibrary(String)
path to client library
Adds an external client library for use by the multi-version client API. Must be set before setting up the network.
ExternalClientDirectory(String)
path to directory containing client libraries
Searches the specified path for dynamic libraries and adds them to the list of client libraries for use by the multi-version client API. Must be set before setting up the network.
DisableLocalClient
Prevents connections through the local client, allowing only connections through externally loaded client libraries.
ClientThreadsPerVersion(i32)
Number of client threads to be spawned. Each cluster will be serviced by a single client thread.
Spawns multiple worker threads for each version of the client that is loaded. Setting this to a number greater than one implies disable_local_client.
DisableClientStatisticsLogging
Disables logging of client statistics, such as sampled transaction activity.
EnableSlowTaskProfiling
Deprecated
EnableRunLoopProfiling
Enables debugging feature to perform run loop profiling. Requires trace logging to be enabled. WARNING: this feature is not recommended for use in production.
ClientBuggifyEnable
Enable client buggify - will make requests randomly fail (intended for client testing)
ClientBuggifyDisable
Disable client buggify
ClientBuggifySectionActivatedProbability(i32)
probability expressed as a percentage between 0 and 100
Set the probability of a CLIENT_BUGGIFY section being active for the current execution.
ClientBuggifySectionFiredProbability(i32)
probability expressed as a percentage between 0 and 100
Set the probability of an active CLIENT_BUGGIFY section being fired. A section will only fire if it was activated
DistributedClientTracer(String)
Distributed tracer type. Choose from none, log_file, or network_lossy
Set a tracer to run on the client. Should be set to the same value as the tracer set on the server.
Trait Implementations
sourceimpl Clone for NetworkOption
impl Clone for NetworkOption
sourcefn clone(&self) -> NetworkOption
fn clone(&self) -> NetworkOption
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for NetworkOption
impl Send for NetworkOption
impl Sync for NetworkOption
impl Unpin for NetworkOption
impl UnwindSafe for NetworkOption
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more