{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
-- | NOTE: This file is generated from <https://github.com/apple/foundationdb/blob/master/fdbclient/vexillographer/fdb.options fdb.options>
-- by the generate-options executable in this project.
-- All documentation on the individual options in this namespace comes
-- from FoundationDB's documentation in @fdb.options@.
module FoundationDB.Options.NetworkOption where
import Data.ByteString.Char8 (ByteString)

{-# DEPRECATED
localAddress "Deprecated in FDB C API"
 #-}
{-# DEPRECATED
clusterFile "Deprecated in FDB C API"
 #-}
{-# DEPRECATED
tlsPlugin "Deprecated in FDB C API"
 #-}
{-# DEPRECATED
enableSlowTaskProfiling "Deprecated in FDB C API"
 #-}
data NetworkOption = NetworkOptionString Int String
                   | NetworkOptionInt Int Int
                   | NetworkOptionBytes Int ByteString
                   | NetworkOptionFlag Int
                       deriving (Int -> NetworkOption -> ShowS
[NetworkOption] -> ShowS
NetworkOption -> String
(Int -> NetworkOption -> ShowS)
-> (NetworkOption -> String)
-> ([NetworkOption] -> ShowS)
-> Show NetworkOption
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NetworkOption] -> ShowS
$cshowList :: [NetworkOption] -> ShowS
show :: NetworkOption -> String
$cshow :: NetworkOption -> String
showsPrec :: Int -> NetworkOption -> ShowS
$cshowsPrec :: Int -> NetworkOption -> ShowS
Show, ReadPrec [NetworkOption]
ReadPrec NetworkOption
Int -> ReadS NetworkOption
ReadS [NetworkOption]
(Int -> ReadS NetworkOption)
-> ReadS [NetworkOption]
-> ReadPrec NetworkOption
-> ReadPrec [NetworkOption]
-> Read NetworkOption
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NetworkOption]
$creadListPrec :: ReadPrec [NetworkOption]
readPrec :: ReadPrec NetworkOption
$creadPrec :: ReadPrec NetworkOption
readList :: ReadS [NetworkOption]
$creadList :: ReadS [NetworkOption]
readsPrec :: Int -> ReadS NetworkOption
$creadsPrec :: Int -> ReadS NetworkOption
Read, NetworkOption -> NetworkOption -> Bool
(NetworkOption -> NetworkOption -> Bool)
-> (NetworkOption -> NetworkOption -> Bool) -> Eq NetworkOption
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NetworkOption -> NetworkOption -> Bool
$c/= :: NetworkOption -> NetworkOption -> Bool
== :: NetworkOption -> NetworkOption -> Bool
$c== :: NetworkOption -> NetworkOption -> Bool
Eq, Eq NetworkOption
Eq NetworkOption
-> (NetworkOption -> NetworkOption -> Ordering)
-> (NetworkOption -> NetworkOption -> Bool)
-> (NetworkOption -> NetworkOption -> Bool)
-> (NetworkOption -> NetworkOption -> Bool)
-> (NetworkOption -> NetworkOption -> Bool)
-> (NetworkOption -> NetworkOption -> NetworkOption)
-> (NetworkOption -> NetworkOption -> NetworkOption)
-> Ord NetworkOption
NetworkOption -> NetworkOption -> Bool
NetworkOption -> NetworkOption -> Ordering
NetworkOption -> NetworkOption -> NetworkOption
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: NetworkOption -> NetworkOption -> NetworkOption
$cmin :: NetworkOption -> NetworkOption -> NetworkOption
max :: NetworkOption -> NetworkOption -> NetworkOption
$cmax :: NetworkOption -> NetworkOption -> NetworkOption
>= :: NetworkOption -> NetworkOption -> Bool
$c>= :: NetworkOption -> NetworkOption -> Bool
> :: NetworkOption -> NetworkOption -> Bool
$c> :: NetworkOption -> NetworkOption -> Bool
<= :: NetworkOption -> NetworkOption -> Bool
$c<= :: NetworkOption -> NetworkOption -> Bool
< :: NetworkOption -> NetworkOption -> Bool
$c< :: NetworkOption -> NetworkOption -> Bool
compare :: NetworkOption -> NetworkOption -> Ordering
$ccompare :: NetworkOption -> NetworkOption -> Ordering
$cp1Ord :: Eq NetworkOption
Ord)

-- | Deprecated
localAddress :: String -> NetworkOption
localAddress String
str = Int -> String -> NetworkOption
NetworkOptionString (Int
10) String
str

-- | Deprecated
clusterFile :: String -> NetworkOption
clusterFile String
str = Int -> String -> NetworkOption
NetworkOptionString (Int
20) String
str

-- | Enables trace output to a file in a directory of the clients choosing
traceEnable :: String -> NetworkOption
traceEnable String
str = Int -> String -> NetworkOption
NetworkOptionString (Int
30) String
str

-- | 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.
traceRollSize :: Int -> NetworkOption
traceRollSize Int
i = Int -> Int -> NetworkOption
NetworkOptionInt (Int
31) Int
i

-- | 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.
traceMaxLogsSize :: Int -> NetworkOption
traceMaxLogsSize Int
i = Int -> Int -> NetworkOption
NetworkOptionInt (Int
32) Int
i

-- | Sets the 'LogGroup' attribute with the specified value for all events in the trace output files. The default log group is 'default'.
traceLogGroup :: String -> NetworkOption
traceLogGroup String
str = Int -> String -> NetworkOption
NetworkOptionString (Int
33) String
str

-- | Select the format of the log files. xml (the default) and json are supported.
traceFormat :: String -> NetworkOption
traceFormat String
str = Int -> String -> NetworkOption
NetworkOptionString (Int
34) String
str

-- | Select clock source for trace files. now (the default) or realtime are supported.
traceClockSource :: String -> NetworkOption
traceClockSource String
str = Int -> String -> NetworkOption
NetworkOptionString (Int
35) String
str

-- | Once provided, this string will be used to replace the port/PID in the log file names.
traceFileIdentifier :: String -> NetworkOption
traceFileIdentifier String
str = Int -> String -> NetworkOption
NetworkOptionString (Int
36) String
str

-- | Set file suffix for partially written log files.
tracePartialFileSuffix :: String -> NetworkOption
tracePartialFileSuffix String
str = Int -> String -> NetworkOption
NetworkOptionString (Int
39) String
str

-- | Set internal tuning or debugging knobs
knob :: String -> NetworkOption
knob String
str = Int -> String -> NetworkOption
NetworkOptionString (Int
40) String
str

-- | Deprecated
tlsPlugin :: String -> NetworkOption
tlsPlugin String
str = Int -> String -> NetworkOption
NetworkOptionString (Int
41) String
str

-- | Set the certificate chain
tlsCertBytes :: ByteString -> NetworkOption
tlsCertBytes ByteString
bs = Int -> ByteString -> NetworkOption
NetworkOptionBytes (Int
42) ByteString
bs

-- | Set the file from which to load the certificate chain
tlsCertPath :: String -> NetworkOption
tlsCertPath String
str = Int -> String -> NetworkOption
NetworkOptionString (Int
43) String
str

-- | Set the private key corresponding to your own certificate
tlsKeyBytes :: ByteString -> NetworkOption
tlsKeyBytes ByteString
bs = Int -> ByteString -> NetworkOption
NetworkOptionBytes (Int
45) ByteString
bs

-- | Set the file from which to load the private key corresponding to your own certificate
tlsKeyPath :: String -> NetworkOption
tlsKeyPath String
str = Int -> String -> NetworkOption
NetworkOptionString (Int
46) String
str

-- | Set the peer certificate field verification criteria
tlsVerifyPeers :: ByteString -> NetworkOption
tlsVerifyPeers ByteString
bs = Int -> ByteString -> NetworkOption
NetworkOptionBytes (Int
47) ByteString
bs

-- | 
buggifyEnable :: NetworkOption
buggifyEnable = Int -> NetworkOption
NetworkOptionFlag (Int
48)

-- | 
buggifyDisable :: NetworkOption
buggifyDisable = Int -> NetworkOption
NetworkOptionFlag (Int
49)

-- | 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.
buggifySectionActivatedProbability :: Int -> NetworkOption
buggifySectionActivatedProbability Int
i = Int -> Int -> NetworkOption
NetworkOptionInt (Int
50) Int
i

-- | Set the probability of an active BUGGIFY section being fired
buggifySectionFiredProbability :: Int -> NetworkOption
buggifySectionFiredProbability Int
i = Int -> Int -> NetworkOption
NetworkOptionInt (Int
51) Int
i

-- | Set the ca bundle
tlsCaBytes :: ByteString -> NetworkOption
tlsCaBytes ByteString
bs = Int -> ByteString -> NetworkOption
NetworkOptionBytes (Int
52) ByteString
bs

-- | Set the file from which to load the certificate authority bundle
tlsCaPath :: String -> NetworkOption
tlsCaPath String
str = Int -> String -> NetworkOption
NetworkOptionString (Int
53) String
str

-- | Set the passphrase for encrypted private key. Password should be set before setting the key for the password to be used.
tlsPassword :: String -> NetworkOption
tlsPassword String
str = Int -> String -> NetworkOption
NetworkOptionString (Int
54) String
str

-- | Disables the multi-version client API and instead uses the local client directly. Must be set before setting up the network.
disableMultiVersionClientApi :: NetworkOption
disableMultiVersionClientApi = Int -> NetworkOption
NetworkOptionFlag (Int
60)

-- | 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.
callbacksOnExternalThreads :: NetworkOption
callbacksOnExternalThreads = Int -> NetworkOption
NetworkOptionFlag (Int
61)

-- | Adds an external client library for use by the multi-version client API. Must be set before setting up the network.
externalClientLibrary :: String -> NetworkOption
externalClientLibrary String
str = Int -> String -> NetworkOption
NetworkOptionString (Int
62) String
str

-- | 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.
externalClientDirectory :: String -> NetworkOption
externalClientDirectory String
str = Int -> String -> NetworkOption
NetworkOptionString (Int
63) String
str

-- | Prevents connections through the local client, allowing only connections through externally loaded client libraries.
disableLocalClient :: NetworkOption
disableLocalClient = Int -> NetworkOption
NetworkOptionFlag (Int
64)

-- | 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.
clientThreadsPerVersion :: Int -> NetworkOption
clientThreadsPerVersion Int
i = Int -> Int -> NetworkOption
NetworkOptionInt (Int
65) Int
i

-- | Disables logging of client statistics, such as sampled transaction activity.
disableClientStatisticsLogging :: NetworkOption
disableClientStatisticsLogging = Int -> NetworkOption
NetworkOptionFlag (Int
70)

-- | Deprecated
enableSlowTaskProfiling :: NetworkOption
enableSlowTaskProfiling = Int -> NetworkOption
NetworkOptionFlag (Int
71)

-- | Enables debugging feature to perform run loop profiling. Requires trace logging to be enabled. WARNING: this feature is not recommended for use in production.
enableRunLoopProfiling :: NetworkOption
enableRunLoopProfiling = Int -> NetworkOption
NetworkOptionFlag (Int
71)

-- | Enable client buggify - will make requests randomly fail (intended for client testing)
clientBuggifyEnable :: NetworkOption
clientBuggifyEnable = Int -> NetworkOption
NetworkOptionFlag (Int
80)

-- | Disable client buggify
clientBuggifyDisable :: NetworkOption
clientBuggifyDisable = Int -> NetworkOption
NetworkOptionFlag (Int
81)

-- | Set the probability of a CLIENT_BUGGIFY section being active for the current execution.
clientBuggifySectionActivatedProbability :: Int -> NetworkOption
clientBuggifySectionActivatedProbability Int
i
  = Int -> Int -> NetworkOption
NetworkOptionInt (Int
82) Int
i

-- | Set the probability of an active CLIENT_BUGGIFY section being fired. A section will only fire if it was activated
clientBuggifySectionFiredProbability :: Int -> NetworkOption
clientBuggifySectionFiredProbability Int
i = Int -> Int -> NetworkOption
NetworkOptionInt (Int
83) Int
i

-- | Set a tracer to run on the client. Should be set to the same value as the tracer set on the server.
distributedClientTracer :: String -> NetworkOption
distributedClientTracer String
str = Int -> String -> NetworkOption
NetworkOptionString (Int
90) String
str

-- | This option is set automatically to communicate the list of supported clients to the active client.
supportedClientVersions :: String -> NetworkOption
supportedClientVersions String
str = Int -> String -> NetworkOption
NetworkOptionString (Int
1000) String
str

-- | This option is set automatically on all clients loaded externally using the multi-version API.
externalClient :: NetworkOption
externalClient = Int -> NetworkOption
NetworkOptionFlag (Int
1001)

-- | This option tells a child on a multiversion client what transport ID to use.
externalClientTransportId :: Int -> NetworkOption
externalClientTransportId Int
i = Int -> Int -> NetworkOption
NetworkOptionInt (Int
1002) Int
i