Skip to main content

Module lifecycle

Module lifecycle 

Source
Expand description

The cluster-side lifecycle verbs: start, stop, restart, destroy, clean (blueprint §17).

Each is one ControlRequest over the shared crate::command::client::Client, plus the presentation a terminal and a script each need. Nothing here decides policy — placement, grace ladders, artefact reclamation all belong to the coordinator; this module decides which request a user’s words mean, and how to say what came back.

  astrs start d.yml --attach ─► Start{Manifest}   ─► Started{dataflow}
                                LogSubscribe      ─► Log frames ──► terminal
                                Check (polled)    ─► DataflowResult ─► exit code

  astrs stop <ref>           ─► Stop / StopByName ─► Ok
  astrs restart <ref>        ─► Restart / RestartByName
  astrs destroy [<ref>]      ─► Destroy{force}
  astrs clean [<ref>]        ─► Clean{artifacts, logs}

§An id or a name, never both spellings at one call site

Every one of these verbs takes “the dataflow” as one positional word. The protocol has two requests for most of them — Stop{dataflow} and StopByName{name} — so crate::command::client::DataflowRef does the classification once and each verb picks the matching request. A user never types --by-name.

Structs§

CleanArgs
astrs clean’s arguments.
DestroyArgs
astrs destroy’s arguments.
RestartArgs
astrs restart’s arguments.
StartArgs
astrs start’s arguments.
StartReport
What one astrs start did.
StopArgs
astrs stop’s arguments.

Constants§

ATTACH_POLL_INTERVAL
How often an attached start asks whether the dataflow has finished.

Functions§

apply_machine_overrides
Applies astrs start --machine placement overrides to manifest (blueprint §8.3 deploy.machine, §17).
clean
Reclaims finished dataflows’ resources.
destroy
Destroys a dataflow, or the whole cluster’s dataflows.
restart
Restarts a dataflow.
start
Starts a dataflow on a running cluster.
stop
Stops a dataflow.