Skip to content

Add ConfigManager class #9

@nnitch

Description

@nnitch

The development branch currently doesn't support handling of configs. 'localhost:25560' is statically declared as the backend.

The implementation of this should see a single Gamma instance only having a single ConfigManager instance. Gamma instances default to LocalConfigManager (see below) if not overwritten at any point of proxy operation.

Class Description
ConfigManager Base class, detailing general structure of ConfigManager classes. raise NotImplementedError on fetch(hostname:str) method.
LocalConfigManager Subclass of ConfigManager that implements the fetch method to load hostname configs from ./gamma/configs/
DemoNetworkConfigManager EXAMPLE subclass of ConfigManager that implements the fetch method to load hostname configs from ./gamma/configs/ (cache) or fetch new from an API and update cache if cached config is expired.

Gamma class should have a set_config_manager(manager:ConfigManager) method added that allows switching out of config managers in real-time, or a new argument in the class constructor (init), or both.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions