Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var WireSet = wire.NewSet( NewTerminalPrompt, wire.Value(OpenInput(TTYOpen)))
Functions ¶
Types ¶
type OpenInput ¶
type OpenInput func() (TerminalInput, error)
type SwitchTerminalModeAction ¶
type SwitchTerminalModeAction struct {
Mode store.TerminalMode
}
func (SwitchTerminalModeAction) Action ¶
func (SwitchTerminalModeAction) Action()
type TerminalInput ¶
func TTYOpen ¶
func TTYOpen() (TerminalInput, error)
type TerminalPrompt ¶
type TerminalPrompt struct {
// contains filtered or unexported fields
}
func NewTerminalPrompt ¶
func (*TerminalPrompt) OnChange ¶
func (p *TerminalPrompt) OnChange(ctx context.Context, st store.RStore, _ store.ChangeSummary) error
func (*TerminalPrompt) SetInitOutput ¶
func (p *TerminalPrompt) SetInitOutput(buf *bytes.Buffer)
Copy initial warnings and info logs from the logstore into the terminal prompt, so that they get shown as part of the prompt.
This sits at the intersection of two incompatible interfaces:
- The LogStore is an asynchronous, streaming log interface that makes sure all logs are shown everywhere (across stdout, hud, web, snapshots, etc).
- The TerminalPrompt is a synchronous interface that shows a deliberately short "greeting" message, then blocks on user input.
Rather than make these two interfaces interoperate well, we just have the internal/cli code copy over the logs during the init sequence. It's OK if logs show up twice.
func (*TerminalPrompt) TearDown ¶
func (p *TerminalPrompt) TearDown(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.