Documentation ¶
Index ¶
- Constants
- func EndCommand(exitStatus int, wantLineNumber bool, clock utils.Clock)
- func MustReceiveFromLogger(config *config.Config, acceptor func(vals []string) bool) []string
- func MustSendToLogger(config *config.Config, vals []string)
- func Signature() string
- func StartCommand(envs string, commandLineArray []string, clock utils.Clock)
- type Logger
- func (l *Logger) Child() *exec.Cmd
- func (l *Logger) CleanUp()
- func (l *Logger) DoLogger()
- func (l *Logger) Master() *os.File
- func (l *Logger) MustReply(config *config.Config, vals []string)
- func (l *Logger) OnChildDied()
- func (l *Logger) SendCloseRequest()
- func (l *Logger) SendFlushRequest()
- func (l *Logger) StartChild()
- type StartRequest
- type StopReply
- type StopRequest
Constants ¶
View Source
const ( // CloseSessionCommand tells the logger to finish successfully. CloseSessionCommand = "close" // FlushCommand tells the logger to flush the currently open log files. FlushCommand = "flush" // CommandStartCommand tells the logger when a command starts. The argument is StartRequest. CommandStartCommand = "start-command" // CommandEndCommand tells the logger when a command finishes. The argument is StopRequest. CommandEndCommand = "end-command" )
Variables ¶
This section is empty.
Functions ¶
func MustReceiveFromLogger ¶
MustReceiveFromLogger reads a command (which is basically just a set of strings) from the named pipe from the logger. acceptor decides if a received command is what the caller is waiting for or not.
func MustSendToLogger ¶
MustSendToLogger writes a command (which is basically just a set of strings) to the named pipe to the logger.
Types ¶
type Logger ¶
type Logger struct { Config *config.Config OuterTty string ForwardPipe *os.File ReversePipe *os.File // contains filtered or unexported fields }
func (*Logger) OnChildDied ¶
func (l *Logger) OnChildDied()
func (*Logger) SendCloseRequest ¶
func (l *Logger) SendCloseRequest()
func (*Logger) SendFlushRequest ¶
func (l *Logger) SendFlushRequest()
func (*Logger) StartChild ¶
func (l *Logger) StartChild()
StartChild starts a child process in a new PTY.
type StartRequest ¶
type StopRequest ¶
Click to show internal directories.
Click to hide internal directories.