-
-
Notifications
You must be signed in to change notification settings - Fork 20
Use channels to pass data to the debug tui #75
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
Conversation
Signed-off-by: Evan Harris <echarris@smcm.edu>
Signed-off-by: Evan Harris <echarris@smcm.edu>
Signed-off-by: Evan Harris <echarris@smcm.edu>
Signed-off-by: Evan Harris <echarris@smcm.edu>
Signed-off-by: Evan Harris <echarris@smcm.edu>
Signed-off-by: Evan Harris <echarris@smcm.edu>
Signed-off-by: Evan Harris <echarris@smcm.edu>
Signed-off-by: Evan Harris <echarris@smcm.edu>
Signed-off-by: Evan Harris <echarris@smcm.edu>
Signed-off-by: Evan Harris <echarris@smcm.edu>
Signed-off-by: Evan Harris <echarris@smcm.edu>
Signed-off-by: Evan Harris <echarris@smcm.edu>
Signed-off-by: Evan Harris <echarris@smcm.edu>
| func (ref *Output) Data(channelKey string, data interface{}) { | ||
| if ch, exists := ref.DataChannels[channelKey]; exists { | ||
| ch <- data // Send data to the corresponding channel | ||
| fmt.Printf("Data sent to channel '%s': %v\n", channelKey, data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use logrus log instead of fmt.Printf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted. Will update / remove.
| ch <- data // Send data to the corresponding channel | ||
| fmt.Printf("Data sent to channel '%s': %v\n", channelKey, data) | ||
| } else { | ||
| fmt.Printf("Channel for channelKey '%s' not found\n", channelKey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use logrus log instead of fmt.Printf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted. Will update / remove.
What
debugtui via an internal channel on execution context.Infoto a provideddataChannelvia aninternalDataCh[note - channel naming should be consistent]OutputFormatfor execution context is specified as"subscription"- then the channels are used to pipe data. This is only implemented for.Infoat the moment for this Proof of Concept.Why
Questions
debug --tuieffectively drops all other provided flags on the floor. This could be a poor UX.--tuiflag as a standalone flag, then perform interactions inside of the interface?debug --tui --runtime=k8s --target=my-nginxbe a desired entrypoint to support? DevX wise - for ease of using the last invoked command without writing out things by hand in a TUI, supporting flags alongside --tui feels relevant.How Tested
mint debug --tuimint images --tuimint tui->d