etcd: go.etcd.io/etcd/pkg/expect Index | Files

package expect

import "go.etcd.io/etcd/pkg/expect"

Package expect implements a small expect-style interface

Index

Package Files

expect.go

type ExpectProcess Uses

type ExpectProcess struct {

    // StopSignal is the signal Stop sends to the process; defaults to SIGKILL.
    StopSignal os.Signal
    // contains filtered or unexported fields
}

func NewExpect Uses

func NewExpect(name string, arg ...string) (ep *ExpectProcess, err error)

NewExpect creates a new process for expect testing.

func NewExpectWithEnv Uses

func NewExpectWithEnv(name string, args []string, env []string) (ep *ExpectProcess, err error)

NewExpectWithEnv creates a new process with user defined env variables for expect testing.

func (*ExpectProcess) Close Uses

func (ep *ExpectProcess) Close() error

Close waits for the expect process to exit.

func (*ExpectProcess) Expect Uses

func (ep *ExpectProcess) Expect(s string) (string, error)

Expect returns the first line containing the given string.

func (*ExpectProcess) ExpectFunc Uses

func (ep *ExpectProcess) ExpectFunc(f func(string) bool) (string, error)

ExpectFunc returns the first line satisfying the function f.

func (*ExpectProcess) LineCount Uses

func (ep *ExpectProcess) LineCount() int

LineCount returns the number of recorded lines since the beginning of the process.

func (*ExpectProcess) Send Uses

func (ep *ExpectProcess) Send(command string) error

func (*ExpectProcess) Signal Uses

func (ep *ExpectProcess) Signal(sig os.Signal) error

Signal sends a signal to the expect process

func (*ExpectProcess) Stop Uses

func (ep *ExpectProcess) Stop() error

Stop kills the expect process and waits for it to exit.

Package expect imports 9 packages (graph) and is imported by 2 packages. Updated 2018-08-29. Refresh now. Tools for package owners.