Application#
- class eclypse.graph.application.Application[source]#
Bases:
AssetGraphClass to represent a multi-service Application.
Methods
__init__(application_id[, update_policies, ...])Create a new Application.
add_service(service, **assets)Add a service to the application.
set_flows([ingress])Set the flows of the application, using the following rules.
Attributes
Check if the application has a logic for each service.
- __init__(application_id, update_policies=None, node_assets=None, edge_assets=None, include_default_assets=True, requirement_init='min', flows=None, seed=None)[source]#
Create a new Application.
- Parameters:
application_id (str) – The ID of the application.
update_policies (Callable | list[Callable] | None) – Graph update policies executed during
evolve().node_assets (dict[str, Asset] | None) – The assets of the nodes.
edge_assets (dict[str, Asset] | None) – The assets of the edges.
include_default_assets (bool) – Whether to include the default assets. Defaults to True.
requirement_init (InitPolicy) – The initialization of the requirements.
flows (list[list[str]] | None) – The flows of the application.
seed (int | None) – The seed for the random number generator.
- add_service(service, **assets)[source]#
Add a service to the application.
- Parameters:
service (Service) – The service to add.
**assets – The assets to add to the service.
- set_flows(ingress='gateway')[source]#
Set the flows of the application, using the following rules.
If the flows are already set, do nothing.
- If the flows are not set, use the ingress as the source and all
the other nodes as the target.
If there is no ingress, set the flows to an empty list.
- Parameters:
ingress (str) – The name of the ingress node. Defaults to “gateway”.
- property has_service_implementations: bool#
Check if the application has a logic for each service.
This property requires to be True for the remote execution.