maple.state.store.add_container

maple.state.store.add_container(container_id: str, type: str, name: str, backend: str, host: str, port: int, status: str = 'starting', metadata: dict = None) str

Register a running container.

Adds a container to the tracking database. If a container with the same ID already exists, replaces it with the new information.

Parameters:
  • container_id – Unique container identifier.

  • type – Container type (‘policy’ or ‘env’).

  • name – Human-readable container name.

  • backend – Container backend being used.

  • host – Host address where container is running.

  • port – Port number for container communication.

  • status – Current container status.

  • metadata – Optional dictionary of additional container metadata.

Returns:

The container ID that was registered.