Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Jun 5, 2025

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 ndeloof force-pushed the refactoring_events branch 5 times, most recently from 13dacd0 to 6773341 Compare June 5, 2025 14:43
…cation termination

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof ndeloof force-pushed the refactoring_events branch 2 times, most recently from 038d4cb to 7373e9f Compare June 6, 2025 06:29
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof ndeloof force-pushed the refactoring_events branch from 7373e9f to 62d9a23 Compare June 6, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant