Documentation
¶
Index ¶
- func OutColorStrings(num int, inStrings string) (str string)
- func PushInput(isExit <-chan bool, output []io.WriteCloser, input io.Reader)
- func TerminalWriter() io.Writer
- type Output
- func (o *Output) Create(server string)
- func (o *Output) GetPrompt() (p string)
- func (o *Output) NewProgressBar(size int64, path string) *mpb.Bar
- func (o *Output) NewWriter() *syncedPipeWriter
- func (o *Output) Printer(reader io.ReadCloser)
- func (o *Output) ProgressPrinter(size int64, reader io.Reader, path string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OutColorStrings ¶
OutColorStrings return color code
func PushInput ¶
func PushInput(isExit <-chan bool, output []io.WriteCloser, input io.Reader)
PushInput is Reader([io.PipeReader, os.Stdin]) to []io.WriteCloser.
func TerminalWriter ¶ added in v0.10.0
Types ¶
type Output ¶
type Output struct {
// Template variable value (in unimplemented).
// - ${COUNT} ... Count value(int)
// - ${SERVER} ... Server Name
// - ${ADDR} ... Address
// - ${USER} ... User Name
// - ${PORT} ... Port
// - ${DATE} ... Date(YYYY/mm/dd)
// - ${YEAR} ... Year(YYYY)
// - ${MONTH} ... Month(mm)
// - ${DAY} ... Day(dd)
// - ${TIME} ... Time(HH:MM:SS)
// - ${HOUR} ... Hour(HH)
// - ${MINUTE} ... Minute(MM)
// - ${SECOND} ... Second(SS)
Templete string
// prompt is Output prompt.
Prompt string
// target server name. ${SERVER}
Server string
// Count value. ${COUNT}
Count int
// Selected Server list
ServerList []string
// ServerConfig
Conf conf.ServerConfig
// Progress bar
Progress *mpb.Progress
ProgressWG *sync.WaitGroup
// Enable/Disable print header
EnableHeader bool
DisableHeader bool
// Auto Colorize flag
AutoColor bool
}
Output struct. command execute and lssh-shell mode output data.
func (*Output) NewProgressBar ¶ added in v0.10.0
func (*Output) NewWriter ¶
func (o *Output) NewWriter() *syncedPipeWriter
NewWriter returns a writer that blocks on Close until the printer drains.
func (*Output) Printer ¶
func (o *Output) Printer(reader io.ReadCloser)
Printer output stdout from reader.
Click to show internal directories.
Click to hide internal directories.