| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Raft.Config
Synopsis
- data RaftNodeConfig = RaftNodeConfig {}
- data StorageState
- data OptionalRaftNodeConfig = OptionalRaftNodeConfig {}
- defaultOptionalRaftNodeConfig :: OptionalRaftNodeConfig
- data ConfigError
- resolveMetricsPort :: Maybe PortNumber -> IO (Maybe PortNumber)
- resolveMetricsPortE :: PortNumber -> IO (Either ConfigError PortNumber)
- resolveTimerSeed :: Maybe Int -> IO Int
Documentation
data RaftNodeConfig Source #
Configuration of a node in the cluster
Constructors
| RaftNodeConfig | |
Fields
| |
Instances
| Show RaftNodeConfig Source # | |
Defined in Raft.Config Methods showsPrec :: Int -> RaftNodeConfig -> ShowS # show :: RaftNodeConfig -> String # showList :: [RaftNodeConfig] -> ShowS # | |
data StorageState Source #
Instances
| Show StorageState Source # | |
Defined in Raft.Config Methods showsPrec :: Int -> StorageState -> ShowS # show :: StorageState -> String # showList :: [StorageState] -> ShowS # | |
data OptionalRaftNodeConfig Source #
Constructors
| OptionalRaftNodeConfig | |
Fields | |
Instances
| Show OptionalRaftNodeConfig Source # | |
Defined in Raft.Config Methods showsPrec :: Int -> OptionalRaftNodeConfig -> ShowS # show :: OptionalRaftNodeConfig -> String # showList :: [OptionalRaftNodeConfig] -> ShowS # | |
data ConfigError Source #
Constructors
| InvalidMetricsPort | |
| NoFreePortAvailable |
Instances
| Show ConfigError Source # | |
Defined in Raft.Config Methods showsPrec :: Int -> ConfigError -> ShowS # show :: ConfigError -> String # showList :: [ConfigError] -> ShowS # | |
resolveMetricsPort :: Maybe PortNumber -> IO (Maybe PortNumber) Source #
resolveMetricsPortE :: PortNumber -> IO (Either ConfigError PortNumber) Source #
If the user specifies a port to fork the EKG server on, make sure the port is open and return the valid port number. If the user does not specify a port to run the monitoring server on, return Nothing.