compose icon indicating copy to clipboard operation
compose copied to clipboard

(refactoring) introduce monitor to manage containers events and application termination

Open ndeloof opened this issue 6 months ago • 0 comments

What I did refactoring:

  • introduced monitor to dispatch container events and manage application termination
  • re-implemented cascade stop as a separate component, relying on event dispatch
  • re-implemented watchcontainer relying on event dispatch, removed from start and log
  • printer only focus on rendering application status, not trying to detect termination - uses explicit termination
  • removed useless pre-allocation of presenter (color) in printer. Will be set on first use.

improvement (2nd commit): collecting start event, capture container's StartTime. This is used to collect logs using log API (we are too late to attach) and retrieve the very first logs. Tested using:

func main() {
        fmt.Println("Hello, World!")
        time.Sleep(10*time.Second)
}

Related issue

(not mandatory) A picture of a cute animal, if possible in relation to what you did image

ndeloof avatar Jun 05 '25 12:06 ndeloof