Documentation
¶
Index ¶
- func IsANSITerminal(ctx context.Context) bool
- func LaunchEmbeddedConsole(ctx context.Context, k *kong.Kong, eventSource *schemaeventsource.EventSource, ...)
- func Predictors(view *schemaeventsource.View) map[string]complete.Predictor
- func PrintJSON(ctx context.Context, json []byte)
- func RunInteractiveConsole(ctx context.Context, k *kong.Kong, eventSource *schemaeventsource.EventSource, ...) error
- func StatusLineAsWriter(status StatusLine) io.Writer
- func UpdateModuleState(ctx context.Context, module string, state BuildState)
- type BuildState
- type CommandExecutor
- type FTLCompletion
- type StatusLine
- type StatusManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsANSITerminal ¶
func IsANSITerminal(ctx context.Context) bool
func LaunchEmbeddedConsole ¶
func LaunchEmbeddedConsole(ctx context.Context, k *kong.Kong, eventSource *schemaeventsource.EventSource, executor CommandExecutor)
func Predictors ¶
func Predictors(view *schemaeventsource.View) map[string]complete.Predictor
func PrintJSON ¶
func PrintJSON(ctx context.Context, json []byte)
PrintJSON prints a json string to the terminal It probably doesn't belong here, but it will be moved later with the interactive terminal work
func RunInteractiveConsole ¶
func RunInteractiveConsole(ctx context.Context, k *kong.Kong, eventSource *schemaeventsource.EventSource, executor CommandExecutor) error
func StatusLineAsWriter ¶ added in v0.417.0
func StatusLineAsWriter(status StatusLine) io.Writer
func UpdateModuleState ¶
func UpdateModuleState(ctx context.Context, module string, state BuildState)
Types ¶
type BuildState ¶
type BuildState string
const BuildStateBuilding BuildState = "Building"
const BuildStateBuilt BuildState = "Built"
const BuildStateDeployWaiting BuildState = "DeployWaiting"
const BuildStateDeployed BuildState = "Deployed"
const BuildStateDeploying BuildState = "Deploying"
const BuildStateFailed BuildState = "Failed"
const BuildStateTerminated BuildState = "Terminated"
const BuildStateWaiting BuildState = "Waiting"
type CommandExecutor ¶ added in v0.464.0
type CommandExecutor func(ctx context.Context, k *kong.Kong, args []string, additionalExit func(int)) error
type FTLCompletion ¶
type FTLCompletion struct {
// contains filtered or unexported fields
}
type StatusLine ¶
type StatusLine interface {
SetMessage(message string)
Close()
}
type StatusManager ¶
type StatusManager interface {
Close()
NewStatus(message string) StatusLine
NewDecoratedStatus(prefix string, suffix string, message string) StatusLine
IntoContext(ctx context.Context) context.Context
SetModuleState(module string, state BuildState)
}
func FromContext ¶
func FromContext(ctx context.Context) StatusManager
func NewStatusManager ¶
func NewStatusManager(ctx context.Context) StatusManager
Click to show internal directories.
Click to hide internal directories.