Fdb.Options
Namespace: FoundationDB.Client · class
Global settings for the FoundationDB binding
Properties
TlsCaBytes
static Slice TlsCaBytes { get; }
Content of the certificate authority bundle
TlsCaPath
static string TlsCaPath { get; }
Path to the certificate authority bundle
TlsCertificateBytes
static Slice TlsCertificateBytes { get; }
Content of the TLS root and client certificates used for TLS connections (none by default)
TlsCertificatePath
static string TlsCertificatePath { get; }
Path to the TLS root and client certificates used for TLS connections (none by default)
TlsPassword
static string TlsPassword { get; }
Passphrase for encrypted TLS private key.
TlsPrivateKeyBytes
static Slice TlsPrivateKeyBytes { get; }
Path to the Private Key used for TLS connections (none by default)
TlsPrivateKeyPath
static string TlsPrivateKeyPath { get; }
Path to the Private Key used for TLS connections (none by default)
TlsVerificationPattern
static Slice TlsVerificationPattern { get; }
Pattern used to verify certificates of TLS peers (none by default)
Methods
DisableNativeLibraryPreloading
static void DisableNativeLibraryPreloading()
Disable preloading of the native C API library. The CLR will handle the binding of the library.
This must be called before the start of the network thread, otherwise it won't have any effects.
EnableNativeLibraryPreloading
static void EnableNativeLibraryPreloading()
Enable automatic preloading of the native C API library. The operating system will handle the binding of the library
This must be called before the start of the network thread, otherwise it won't have any effects.
GetExpectedNativeLibraryName
static string GetExpectedNativeLibraryName()
Returns the expected native library file native for the current OS platform
Returns: "fdb_c.dll" on Windows, "fdb_c.so" on Linux, etc...
SetNativeLibPath
static void SetNativeLibPath(string path)
Preload the native C API library from a specific path (relative of absolute) where the fdb_c.dll library is located
This must be called before the start of the network thread, otherwise it won't have any effects. You can specify the path to a library with a custom file name by making sure that ends with ".dll". If not, then either fdb_c.dll (on Windows) or fdb_c.so (on Linux) will be appended to the path.
Fdb.Options.SetNativeLibPath(@".\libs\x64") will attempt to load ".\libs\x64\fdb_c.dll" Fdb.Options.SetNativeLibPath(@".\libs\x64\my_custom_fdb_c.dll") will attempt to load ".\libs\x64\my_custom_fdb_c.dll"
SetTlsCertificate
static void SetTlsCertificate(Slice bytes)
Sets the path to the root certificate and public key for TLS connections
This must be called before the start of the network thread, otherwise it won't have any effects.
static void SetTlsCertificate(string path)
Sets the path to the root certificate and public key for TLS connections
This must be called before the start of the network thread, otherwise it won't have any effects.
SetTlsPrivateKey
static void SetTlsPrivateKey(Slice bytes, string password = null)
Sets the path to the private key for TLS connections
This must be called before the start of the network thread, otherwise it won't have any effects.
static void SetTlsPrivateKey(string path, string password = null)
Sets the path to the private key for TLS connections
This must be called before the start of the network thread, otherwise it won't have any effects.
SetTlsVerificationPattern
static void SetTlsVerificationPattern(Slice pattern)
Sets the pattern with which to verify certificates of TLS peers
This must be called before the start of the network thread, otherwise it won't have any effects.
SetTracePath
static void SetTracePath(string outputDirectory)
Sets the custom path where the logs will be stored
This must be called before the start of the network thread, otherwise it won't have any effects.
UseTls
static void UseTls(Slice certificateBytes, Slice privateKeyBytes, Slice verificationPattern = null, string password = null)
Use TLS to secure the connections to the cluster
certificateBytes— Content of the root certificate and public keyprivateKeyBytes— Content of the private keyverificationPattern— Verification with which to verify certificates of TLS peers (optional)password— Passphrase for the encrypted private key (optional)
static void UseTls(string certificatePath, string privateKeyPath, Slice verificationPattern = null, string password = null)
Use TLS to secure the connections to the cluster
certificatePath— Path to the root certificate and public keyprivateKeyPath— Path to the private keyverificationPattern— Verification with which to verify certificates of TLS peers (optional)password— Passphrase for the encrypted private key (optional)
Fields
NativeLibPath
static string NativeLibPath
Custom path from where to load the native C API library. If null, let the CLR find the dll. If String.Empty let Win32's LoadLibrary find the correct dll, else use the specified path to load the library
TracePath
static string TracePath
Default path to the network thread tracing file