koi_net.interfaces.network
Classes
|
|
|
|
- class koi_net.interfaces.network.KoiNetworkConfig(**data)[source]
Bases:
BaseModel- Parameters:
first_contact (str | None)
nodes (dict[str, str])
- first_contact: str | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- nodes: dict[str, str]
- class koi_net.interfaces.network.NetworkConfigProvider(config_schema, root_dir)[source]
Bases:
ConfigProvider
- class koi_net.interfaces.network.NetworkInterface[source]
Bases:
object- add_node(node)[source]
- Parameters:
node (NodeInterface)
- apply_first_contact(source, target)[source]
- Parameters:
source (BaseNodeConfig)
target (BaseNodeConfig)
- config: KoiNetworkConfig | NetworkConfigProvider
- load_nodes()[source]
- Return type:
list[NodeInterface]
- nodes: list[NodeInterface]
- remove_node(node)[source]
- Parameters:
node (NodeInterface)
- resolve_node(name)[source]
- Return type:
NodeInterface|None- Parameters:
name (str)
- set_first_contact(fc_node)[source]
- Parameters:
fc_node (NodeInterface)
- unset_first_contact(fc_node)[source]
- Parameters:
fc_node (NodeInterface)