| 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 |
Zuul.ZooKeeper
Description
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.
Constructors
| ZKConnection [Text] |
Instances
| Show ZKConnection Source # | |
Defined in Zuul.ZooKeeper Methods showsPrec :: Int -> ZKConnection -> ShowS # show :: ZKConnection -> String # showList :: [ZKConnection] -> ShowS # | |
| Eq ZKConnection Source # | |
Defined in Zuul.ZooKeeper | |
fetchConfigs :: Logger -> FilePathT -> ZKConnection -> ExceptT Text IO () Source #
Dump the configuration found in ZooKeeper
File parser
Arguments
| :: 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.
Constructors
| ZKFile | |
data ConfigError Source #
The list of config error that can happens when loading the configuration.
Constructors
| 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
Arguments
| :: 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
Constructors
| ZKTenantsConfig Value |
Instances
| Show ZKTenantsConfig Source # | |
Defined in Zuul.ZooKeeper Methods showsPrec :: Int -> ZKTenantsConfig -> ShowS # show :: ZKTenantsConfig -> String # showList :: [ZKTenantsConfig] -> ShowS # | |
| Eq ZKTenantsConfig Source # | |
Defined in Zuul.ZooKeeper Methods (==) :: ZKTenantsConfig -> ZKTenantsConfig -> Bool # (/=) :: ZKTenantsConfig -> ZKTenantsConfig -> Bool # | |