Documentation ¶
Index ¶
- func New(p params.Params, tcr engine.TcrInterface) ui.UserInterface
- func Restore()
- func SetRaw() bytes.Buffer
- func StartInterruptHandler()
- type TerminalUI
- func (term *TerminalUI) Confirm(message string, defaultAnswer bool) bool
- func (term *TerminalUI) MuteDesktopNotifications(muted bool)
- func (term *TerminalUI) NotifyRoleEnding(r role.Role)
- func (term *TerminalUI) NotifyRoleStarting(r role.Role)
- func (term *TerminalUI) ReportError(emphasis bool, a ...interface{})
- func (*TerminalUI) ReportInfo(_ bool, a ...interface{})
- func (*TerminalUI) ReportSimple(_ bool, a ...interface{})
- func (term *TerminalUI) ReportSuccess(emphasis bool, a ...interface{})
- func (term *TerminalUI) ReportTimer(emphasis bool, a ...interface{})
- func (*TerminalUI) ReportTitle(_ bool, a ...interface{})
- func (term *TerminalUI) ReportWarning(emphasis bool, a ...interface{})
- func (term *TerminalUI) ShowRunningMode(mode runmode.RunMode)
- func (term *TerminalUI) ShowSessionInfo()
- func (term *TerminalUI) Start()
- func (term *TerminalUI) StartReporting()
- func (term *TerminalUI) StopReporting()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(p params.Params, tcr engine.TcrInterface) ui.UserInterface
New creates a new instance of terminal
func StartInterruptHandler ¶
func StartInterruptHandler()
StartInterruptHandler enforces that program interruptions such as Ctrl-C (SIGINT) are handled properly, cleaning up whatever needs to be cleaned up before exiting
Types ¶
type TerminalUI ¶
type TerminalUI struct {
// contains filtered or unexported fields
}
TerminalUI is the user interface implementation when using the Command Line Interface
func (*TerminalUI) Confirm ¶
func (term *TerminalUI) Confirm(message string, defaultAnswer bool) bool
Confirm asks the user for confirmation
func (*TerminalUI) MuteDesktopNotifications ¶
func (term *TerminalUI) MuteDesktopNotifications(muted bool)
MuteDesktopNotifications allows preventing desktop Notification popups from being displayed. Used for test automation at the moment. Could be turned into a feature later if there is need for it.
func (*TerminalUI) NotifyRoleEnding ¶
func (term *TerminalUI) NotifyRoleEnding(r role.Role)
NotifyRoleEnding tells the user that TCR engine is ending the provided role
func (*TerminalUI) NotifyRoleStarting ¶
func (term *TerminalUI) NotifyRoleStarting(r role.Role)
NotifyRoleStarting tells the user that TCR engine is starting with the provided role
func (*TerminalUI) ReportError ¶
func (term *TerminalUI) ReportError(emphasis bool, a ...interface{})
ReportError reports error messages
func (*TerminalUI) ReportInfo ¶
func (*TerminalUI) ReportInfo(_ bool, a ...interface{})
ReportInfo reports info messages
func (*TerminalUI) ReportSimple ¶
func (*TerminalUI) ReportSimple(_ bool, a ...interface{})
ReportSimple reports simple messages
func (*TerminalUI) ReportSuccess ¶
func (term *TerminalUI) ReportSuccess(emphasis bool, a ...interface{})
ReportSuccess reports success messages
func (*TerminalUI) ReportTimer ¶
func (term *TerminalUI) ReportTimer(emphasis bool, a ...interface{})
ReportTimer reports timer messages
func (*TerminalUI) ReportTitle ¶
func (*TerminalUI) ReportTitle(_ bool, a ...interface{})
ReportTitle reports title messages
func (*TerminalUI) ReportWarning ¶
func (term *TerminalUI) ReportWarning(emphasis bool, a ...interface{})
ReportWarning reports warning messages
func (*TerminalUI) ShowRunningMode ¶
func (term *TerminalUI) ShowRunningMode(mode runmode.RunMode)
ShowRunningMode shows the current running mode
func (*TerminalUI) ShowSessionInfo ¶
func (term *TerminalUI) ShowSessionInfo()
ShowSessionInfo shows main information related to the current TCR session
func (*TerminalUI) StartReporting ¶
func (term *TerminalUI) StartReporting()
StartReporting tells the terminal to start reporting information
func (*TerminalUI) StopReporting ¶
func (term *TerminalUI) StopReporting()
StopReporting tells the terminal to stop reporting information