Documentation ¶
Index ¶
- Constants
- Variables
- func CmdErrLogger(pipe io.ReadCloser)
- func ConfirmComplete(d prompt.Document) ([]prompt.Suggest, istrings.RuneNumber, istrings.RuneNumber)
- func CreateProject(prjPath string) error
- func EditFile(filename, editor string) error
- func Execute()
- func Fatal(msg string, a ...interface{})
- func Init()
- func ListProjects() *proto.PrjListResponse
- func NewPrompt(prjName, prjID, prjPath string)
- func OpenProject(prjPath string) (string, string, error)
- func ProgressAbort(bars []ProgressBarT, drop bool)
- func ProgressCloseHandleMsg(mpBar *mpb.Progress, bars []ProgressBarT, msg *proto.ProjectCloseMsg)
- func ProgressForceComplete(bars []ProgressBarT)
- func ProgressRunHandleMsg(mpBar *mpb.Progress, bars []ProgressBarT, msg *proto.TopologyRunMsg)
- func StartRemoteConsole(server, node string, shell bool) error
- type ConnectCompleter
- type NetemCommand
- type NetemConsoleClient
- type NetemNode
- type NetemPrompt
- func (p *NetemPrompt) Capture(cmdArgs []string)
- func (p *NetemPrompt) Check(client proto.NetemClient, cmdArgs []string)
- func (p *NetemPrompt) Close() error
- func (p *NetemPrompt) Config(client proto.NetemClient, cmdArgs []string)
- func (p *NetemPrompt) CopyFrom(srcNode, srcPath, destPath string)
- func (p *NetemPrompt) CopyTo(srcPath, destNode, destPath string)
- func (p *NetemPrompt) Edit(client proto.NetemClient, cmdArgs []string)
- func (p *NetemPrompt) Exec(client proto.NetemClient, cmdArgs []string)
- func (p *NetemPrompt) Execute(s string)
- func (p *NetemPrompt) IfState(client proto.NetemClient, cmdArgs []string)
- func (p *NetemPrompt) RegisterCommands()
- func (p *NetemPrompt) Reload(client proto.NetemClient, cmdArgs []string)
- func (p *NetemPrompt) Restart(client proto.NetemClient, cmdArgs []string)
- func (p *NetemPrompt) Run(client proto.NetemClient, cmdArgs []string)
- func (p *NetemPrompt) Save(client proto.NetemClient, cmdArgs []string)
- func (p *NetemPrompt) SaveAs(client proto.NetemClient, cmdArgs []string)
- func (p *NetemPrompt) Start(client proto.NetemClient, cmdArgs []string)
- func (p *NetemPrompt) StartAll(client proto.NetemClient, cmdArgs []string)
- func (p *NetemPrompt) Status(client proto.NetemClient, cmdArgs []string)
- func (p *NetemPrompt) Stop(client proto.NetemClient, cmdArgs []string)
- func (p *NetemPrompt) StopAll(client proto.NetemClient, cmdArgs []string)
- type ProgressBarT
- type PromptCompleter
Constants ¶
View Source
const (
CONFIG_TPL = `` /* 159-byte string literal not displayed */
)
Variables ¶
Functions ¶
func CmdErrLogger ¶
func CmdErrLogger(pipe io.ReadCloser)
func ConfirmComplete ¶
func ConfirmComplete(d prompt.Document) ([]prompt.Suggest, istrings.RuneNumber, istrings.RuneNumber)
func CreateProject ¶
func ListProjects ¶
func ListProjects() *proto.PrjListResponse
func ProgressAbort ¶ added in v0.3.0
func ProgressAbort(bars []ProgressBarT, drop bool)
func ProgressCloseHandleMsg ¶ added in v0.3.0
func ProgressCloseHandleMsg(mpBar *mpb.Progress, bars []ProgressBarT, msg *proto.ProjectCloseMsg)
func ProgressForceComplete ¶ added in v0.3.0
func ProgressForceComplete(bars []ProgressBarT)
func ProgressRunHandleMsg ¶ added in v0.3.0
func ProgressRunHandleMsg(mpBar *mpb.Progress, bars []ProgressBarT, msg *proto.TopologyRunMsg)
func StartRemoteConsole ¶
Types ¶
type ConnectCompleter ¶
type ConnectCompleter struct {
// contains filtered or unexported fields
}
func NewConnectCompleter ¶
func NewConnectCompleter(projects *proto.PrjListResponse) *ConnectCompleter
func (*ConnectCompleter) Complete ¶
func (c *ConnectCompleter) Complete(d prompt.Document) ([]prompt.Suggest, istrings.RuneNumber, istrings.RuneNumber)
type NetemCommand ¶
type NetemCommand struct { Desc string Usage string Args []string Run func(p *NetemPrompt, cmdArgs []string) }
type NetemConsoleClient ¶
type NetemConsoleClient struct { Conn *grpc.ClientConn Client proto.NetemClient }
func NewClient ¶
func NewClient(server string) (*NetemConsoleClient, error)
type NetemPrompt ¶
type NetemPrompt struct {
// contains filtered or unexported fields
}
func NewNetemPrompt ¶
func NewNetemPrompt(server, prjID, prjPath string) *NetemPrompt
func (*NetemPrompt) Capture ¶
func (p *NetemPrompt) Capture(cmdArgs []string)
func (*NetemPrompt) Check ¶
func (p *NetemPrompt) Check(client proto.NetemClient, cmdArgs []string)
func (*NetemPrompt) Close ¶
func (p *NetemPrompt) Close() error
func (*NetemPrompt) Config ¶ added in v0.1.4
func (p *NetemPrompt) Config(client proto.NetemClient, cmdArgs []string)
func (*NetemPrompt) CopyFrom ¶
func (p *NetemPrompt) CopyFrom(srcNode, srcPath, destPath string)
func (*NetemPrompt) CopyTo ¶
func (p *NetemPrompt) CopyTo(srcPath, destNode, destPath string)
func (*NetemPrompt) Edit ¶
func (p *NetemPrompt) Edit(client proto.NetemClient, cmdArgs []string)
func (*NetemPrompt) Exec ¶ added in v0.4.0
func (p *NetemPrompt) Exec(client proto.NetemClient, cmdArgs []string)
func (*NetemPrompt) Execute ¶
func (p *NetemPrompt) Execute(s string)
func (*NetemPrompt) IfState ¶
func (p *NetemPrompt) IfState(client proto.NetemClient, cmdArgs []string)
func (*NetemPrompt) RegisterCommands ¶
func (p *NetemPrompt) RegisterCommands()
func (*NetemPrompt) Reload ¶
func (p *NetemPrompt) Reload(client proto.NetemClient, cmdArgs []string)
func (*NetemPrompt) Restart ¶
func (p *NetemPrompt) Restart(client proto.NetemClient, cmdArgs []string)
func (*NetemPrompt) Run ¶
func (p *NetemPrompt) Run(client proto.NetemClient, cmdArgs []string)
func (*NetemPrompt) Save ¶
func (p *NetemPrompt) Save(client proto.NetemClient, cmdArgs []string)
func (*NetemPrompt) SaveAs ¶
func (p *NetemPrompt) SaveAs(client proto.NetemClient, cmdArgs []string)
func (*NetemPrompt) Start ¶
func (p *NetemPrompt) Start(client proto.NetemClient, cmdArgs []string)
func (*NetemPrompt) StartAll ¶ added in v0.3.0
func (p *NetemPrompt) StartAll(client proto.NetemClient, cmdArgs []string)
func (*NetemPrompt) Status ¶
func (p *NetemPrompt) Status(client proto.NetemClient, cmdArgs []string)
func (*NetemPrompt) Stop ¶
func (p *NetemPrompt) Stop(client proto.NetemClient, cmdArgs []string)
func (*NetemPrompt) StopAll ¶ added in v0.3.0
func (p *NetemPrompt) StopAll(client proto.NetemClient, cmdArgs []string)
type ProgressBarT ¶ added in v0.3.0
type ProgressBarT struct { Total int Bar *mpb.Bar }
type PromptCompleter ¶
type PromptCompleter struct {
// contains filtered or unexported fields
}
func NewPromptCompleter ¶
func NewPromptCompleter(prompt *NetemPrompt) *PromptCompleter
func (*PromptCompleter) Complete ¶
func (c *PromptCompleter) Complete(d prompt.Document) ([]prompt.Suggest, istrings.RuneNumber, istrings.RuneNumber)
Click to show internal directories.
Click to hide internal directories.