Copyright | (c) Red Hat 2022 |
---|---|
License | Apache-2.0 |
Maintainer | tdecacqu@redhat.com, fboucher@redhat.com |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
This module contains the logic to load data from ZooKeeper
Synopsis
- newtype ZKConnection = ZKConnection [Text]
- fetchConfigs :: Logger -> FilePathT -> ZKConnection -> ExceptT Text IO ()
- walkConfigNodes :: FilePathT -> Stream (Of (Either ConfigError ZKFile)) IO ()
- data ZKFile = ZKFile {}
- data ConfigError
- readTenantsConfig :: FilePathT -> ExceptT Text IO ZKTenantsConfig
- newtype ZKTenantsConfig = ZKTenantsConfig Value
- mkZKFile :: Value -> FilePathT -> Maybe ZKFile
Data acquision fetcher
newtype ZKConnection Source #
The ZooKeeper connection settings: hostname and tls paths.
Instances
Show ZKConnection Source # | |
Defined in Zuul.ZooKeeper showsPrec :: Int -> ZKConnection -> ShowS # show :: ZKConnection -> String # showList :: [ZKConnection] -> ShowS # | |
Eq ZKConnection Source # | |
Defined in Zuul.ZooKeeper (==) :: ZKConnection -> ZKConnection -> Bool # (/=) :: ZKConnection -> ZKConnection -> Bool # |
fetchConfigs :: Logger -> FilePathT -> ZKConnection -> ExceptT Text IO () Source #
Dump the configuration found in ZooKeeper
File parser
:: FilePathT | The ZooKeeper dump location |
-> Stream (Of (Either ConfigError ZKFile)) IO () | A stream of configuration file |
Read all the configuration found at the given path
A config file read from ZooKeeper.
data ConfigError Source #
The list of config error that can happens when loading the configuration.
ReadError Text | System level exception, e.g. ENOENT |
YamlError Text | YAML decoding error |
InvalidPath | The path is missing component, e.g. branch name |
AmbiguousName Text | |
DecodeError FilePathT Text Value | A decoding error |
Instances
Helper to load the tenants configuration
:: FilePathT | The ZooKeeper dump location |
-> ExceptT Text IO ZKTenantsConfig | The object to be decoded by "Zuul.Tenant.decodeTenantsConfig" |
Read the main.yaml from the ZooKeeper dump
newtype ZKTenantsConfig Source #
The tenant configuration value read from ZooKeeper. To be decoded by decodeTenantsConfig
Instances
Show ZKTenantsConfig Source # | |
Defined in Zuul.ZooKeeper showsPrec :: Int -> ZKTenantsConfig -> ShowS # show :: ZKTenantsConfig -> String # showList :: [ZKTenantsConfig] -> ShowS # | |
Eq ZKTenantsConfig Source # | |
Defined in Zuul.ZooKeeper (==) :: ZKTenantsConfig -> ZKTenantsConfig -> Bool # (/=) :: ZKTenantsConfig -> ZKTenantsConfig -> Bool # |