Documentation ¶
Index ¶
- type SessionInfo
- type TcrEngine
- func (tcr *TcrEngine) GetCurrentRole() role.Role
- func (tcr *TcrEngine) GetSessionInfo() SessionInfo
- func (tcr *TcrEngine) Init(u ui.UserInterface, p params.Params)
- func (tcr *TcrEngine) PrintLog(p params.Params)
- func (tcr *TcrEngine) PrintStats(p params.Params)
- func (*TcrEngine) Quit()
- func (tcr *TcrEngine) ReportMobTimerStatus()
- func (tcr *TcrEngine) RunAsDriver()
- func (tcr *TcrEngine) RunAsNavigator()
- func (*TcrEngine) RunCheck(p params.Params)
- func (tcr *TcrEngine) RunTCRCycle()
- func (tcr *TcrEngine) SetAutoPush(ap bool)
- func (tcr *TcrEngine) SetCommitOnFail(flag bool)
- func (tcr *TcrEngine) SetRunMode(m runmode.RunMode)
- func (tcr *TcrEngine) Stop()
- func (tcr *TcrEngine) ToggleAutoPush()
- type TcrInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SessionInfo ¶
type SessionInfo struct { BaseDir string WorkDir string LanguageName string ToolchainName string AutoPush bool CommitOnFail bool BranchName string }
SessionInfo contains TCR session information. Used mainly to exchange information between TCR engine and UI
type TcrEngine ¶
type TcrEngine struct {
// contains filtered or unexported fields
}
TcrEngine is the engine running all TCR operations
func (*TcrEngine) GetCurrentRole ¶
GetCurrentRole returns the role currently used for running TCR. Returns nil when TCR engine is in standby
func (*TcrEngine) GetSessionInfo ¶
func (tcr *TcrEngine) GetSessionInfo() SessionInfo
GetSessionInfo provides the information related to the current TCR session. Used mainly by the user interface packages to retrieve and display this information
func (*TcrEngine) Init ¶
func (tcr *TcrEngine) Init(u ui.UserInterface, p params.Params)
Init initializes the TCR engine with the provided parameters, and wires it to the user interface. This function should be called only once during the lifespan of the application
func (*TcrEngine) PrintStats ¶
PrintStats prints the TCR execution stats
func (*TcrEngine) ReportMobTimerStatus ¶
func (tcr *TcrEngine) ReportMobTimerStatus()
ReportMobTimerStatus reports the status of the mob timer
func (*TcrEngine) RunAsDriver ¶
func (tcr *TcrEngine) RunAsDriver()
RunAsDriver tells TCR engine to start running with driver role
func (*TcrEngine) RunAsNavigator ¶
func (tcr *TcrEngine) RunAsNavigator()
RunAsNavigator tells TCR engine to start running with navigator role
func (*TcrEngine) RunCheck ¶
RunCheck checks the provided parameters and prints out corresponding report
func (*TcrEngine) RunTCRCycle ¶
func (tcr *TcrEngine) RunTCRCycle()
RunTCRCycle is the core of TCR engine: e.g. it runs one test && commit || revert cycle
func (*TcrEngine) SetAutoPush ¶
SetAutoPush sets git auto-push to the provided value
func (*TcrEngine) SetCommitOnFail ¶
SetCommitOnFail sets git commit-on-fail option to the provided value
func (*TcrEngine) SetRunMode ¶
SetRunMode sets the run mode for TCR engine
func (*TcrEngine) Stop ¶
func (tcr *TcrEngine) Stop()
Stop is the entry point for telling TCR engine to stop its current operations
func (*TcrEngine) ToggleAutoPush ¶
func (tcr *TcrEngine) ToggleAutoPush()
ToggleAutoPush toggles git auto-push state
type TcrInterface ¶
type TcrInterface interface { Init(u ui.UserInterface, p params.Params) ToggleAutoPush() SetAutoPush(flag bool) SetCommitOnFail(flag bool) GetCurrentRole() role.Role RunAsDriver() Stop() RunTCRCycle() GetSessionInfo() SessionInfo ReportMobTimerStatus() SetRunMode(m runmode.RunMode) RunCheck(p params.Params) PrintLog(p params.Params) PrintStats(p params.Params) Quit() // contains filtered or unexported methods }
TcrInterface provides the API for interacting with TCR engine
var ( // Tcr is TCR Engine singleton instance Tcr TcrInterface )