Documentation
¶
Index ¶
- type PTY
- func (p *PTY) Attach(inv *serpent.Invocation) *PTY
- func (p *PTY) Close() error
- func (e *PTY) ExpectMatch(str string) string
- func (e *PTY) ExpectMatchContext(ctx context.Context, str string) string
- func (e *PTY) ExpectNoMatchBefore(ctx context.Context, match, before string) string
- func (e *PTY) ExpectRegexMatch(str string) string
- func (e *PTY) ExpectRegexMatchContext(ctx context.Context, str string) string
- func (e *PTY) Peek(ctx context.Context, n int) []byte
- func (e *PTY) ReadAll() []byte
- func (e *PTY) ReadLine(ctx context.Context) string
- func (e *PTY) ReadRune(ctx context.Context) rune
- func (p *PTY) Write(r rune)
- func (p *PTY) WriteLine(str string)
- type PTYCmd
- func (p *PTYCmd) Close() error
- func (e *PTYCmd) ExpectMatch(str string) string
- func (e *PTYCmd) ExpectMatchContext(ctx context.Context, str string) string
- func (e *PTYCmd) ExpectNoMatchBefore(ctx context.Context, match, before string) string
- func (e *PTYCmd) ExpectRegexMatch(str string) string
- func (e *PTYCmd) ExpectRegexMatchContext(ctx context.Context, str string) string
- func (e *PTYCmd) Peek(ctx context.Context, n int) []byte
- func (e *PTYCmd) ReadAll() []byte
- func (e *PTYCmd) ReadLine(ctx context.Context) string
- func (e *PTYCmd) ReadRune(ctx context.Context) rune
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PTY ¶
func (*PTY) ExpectMatch ¶
func (*PTY) ExpectMatchContext ¶
TODO(mafredri): Rename this to ExpectMatch when refactoring.
func (*PTY) ExpectNoMatchBefore ¶
ExpectNoMatchBefore validates that `match` does not occur before `before`.
func (*PTY) ExpectRegexMatch ¶ added in v2.10.0
func (*PTY) ExpectRegexMatchContext ¶ added in v2.10.0
type PTYCmd ¶
func Start ¶
Start starts a new process asynchronously and returns a PTYCmd and Process. It kills the process and PTYCmd upon cleanup
func (*PTYCmd) ExpectMatch ¶
func (*PTYCmd) ExpectMatchContext ¶
TODO(mafredri): Rename this to ExpectMatch when refactoring.
func (*PTYCmd) ExpectNoMatchBefore ¶
ExpectNoMatchBefore validates that `match` does not occur before `before`.
func (*PTYCmd) ExpectRegexMatch ¶ added in v2.10.0
func (*PTYCmd) ExpectRegexMatchContext ¶ added in v2.10.0
Click to show internal directories.
Click to hide internal directories.