diff options
author | tv <tv@krebsco.de> | 2020-04-17 22:41:53 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2020-04-17 23:11:07 +0200 |
commit | 7dfc802b753f21afcb656b13d30d49bc548ac150 (patch) | |
tree | 664d84c3f6ec28b7affc26b509ddc608bd06939d /src/Reaktor.hs | |
parent | d6d51de7c9d54691b33a8ae9691fd0402259006a (diff) |
Reaktor.API: make configurable
Diffstat (limited to 'src/Reaktor.hs')
-rw-r--r-- | src/Reaktor.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Reaktor.hs b/src/Reaktor.hs index 0d4e42c..cc93109 100644 --- a/src/Reaktor.hs +++ b/src/Reaktor.hs @@ -41,8 +41,8 @@ import System.IO (hIsTerminalDevice) import System.Posix.Signals -run :: Config -> (Actions -> IO [Message -> IO ()]) -> IO () -run Config{..} getPlugins = +run :: Config -> Maybe API.Config -> (Actions -> IO [Message -> IO ()]) -> IO () +run Config{..} apiConfig getPlugins = if cUseTLS then do s <- TLS.getDefaultClientSettings (cHostName, BS.pack cServiceName) TLS.connect s cHostName cServiceName $ \(ctx, sockAddr) -> @@ -84,7 +84,7 @@ run Config{..} getPlugins = plugins <- getPlugins actions threads <- mapM (\f -> forkIO $ f `finally` shutdown) [ - API.main actions, + API.main actions apiConfig, receiver actions putInMsg sockRecv, logger cLogHandle takeLog, pinger aSend, |