zuul-weeder-0.1.0.0: Zuul configuration analyzer
Copyright(c) Red Hat 2022
LicenseApache-2.0
Maintainertdecacqu@redhat.com, fboucher@redhat.com
Stabilityprovisional
Portabilityportable
Safe HaskellSafe-Inferred
LanguageGHC2021

Zuul.ZooKeeper

Description

This module contains the logic to load data from ZooKeeper

Synopsis

Data acquision fetcher

newtype ZKConnection Source #

The ZooKeeper connection settings: hostname and tls paths.

Constructors

ZKConnection [Text] 

Instances

Instances details
Show ZKConnection Source # 
Instance details

Defined in Zuul.ZooKeeper

Eq ZKConnection Source # 
Instance details

Defined in Zuul.ZooKeeper

fetchConfigs :: Logger -> FilePathT -> ZKConnection -> ExceptT Text IO () Source #

Dump the configuration found in ZooKeeper

File parser

walkConfigNodes Source #

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

data ZKFile Source #

A config file read from ZooKeeper.

Constructors

ZKFile 

Fields

Instances

Instances details
Show ZKFile Source # 
Instance details

Defined in Zuul.ZooKeeper

Eq ZKFile Source # 
Instance details

Defined in Zuul.ZooKeeper

Methods

(==) :: ZKFile -> ZKFile -> Bool #

(/=) :: ZKFile -> ZKFile -> Bool #

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

Instances details
FromJSON ConfigError Source # 
Instance details

Defined in Zuul.ZooKeeper

ToJSON ConfigError Source # 
Instance details

Defined in Zuul.ZooKeeper

Generic ConfigError Source # 
Instance details

Defined in Zuul.ZooKeeper

Associated Types

type Rep ConfigError :: Type -> Type #

Show ConfigError Source # 
Instance details

Defined in Zuul.ZooKeeper

Eq ConfigError Source # 
Instance details

Defined in Zuul.ZooKeeper

type Rep ConfigError Source # 
Instance details

Defined in Zuul.ZooKeeper

Helper to load the tenants configuration

readTenantsConfig Source #

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

Instances details
Show ZKTenantsConfig Source # 
Instance details

Defined in Zuul.ZooKeeper

Eq ZKTenantsConfig Source # 
Instance details

Defined in Zuul.ZooKeeper

Test helpers

mkZKFile :: Value -> FilePathT -> Maybe ZKFile Source #

Creates a ZKFile for testing purpose.