Documentation ¶
Index ¶
- func Must(args ...interface{})
- func Must2[V any](v V, err error) V
- type Cluster
- func (c *Cluster) Cleanup() error
- func (c *Cluster) Context(ctx context.Context) *Cluster
- func (c *Cluster) MustCleanup()
- func (c *Cluster) MustNewNode() *Node
- func (c *Cluster) MustNewNodes(n int) []*Node
- func (c *Cluster) NewNode() (*Node, error)
- func (c *Cluster) NewNodes(n int) ([]*Node, error)
- func (c *Cluster) WithLogger(l *zap.SugaredLogger) *Cluster
- type Node
- func (n *Node) Context(ctx context.Context) *Node
- func (n *Node) MustReadFile(filePath string) io.ReadCloser
- func (n *Node) MustRun(req clusteriface.StartProcRequest) *clusteriface.ProcessResult
- func (n *Node) MustSendFile(filePath string, contents io.Reader)
- func (n *Node) MustStartProc(req clusteriface.StartProcRequest) *Process
- func (n *Node) ReadFile(filePath string) (io.ReadCloser, error)
- func (n *Node) RootDir() string
- func (n *Node) Run(req clusteriface.StartProcRequest) (*clusteriface.ProcessResult, error)
- func (n *Node) SendFile(filePath string, contents io.Reader) error
- func (n *Node) StartProc(req clusteriface.StartProcRequest) (*Process, error)
- type Process
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cluster ¶
type Cluster struct { Cluster clusteriface.Cluster Log *zap.SugaredLogger Ctx context.Context }
Cluster wraps a clusteriface.Cluster with convenience functionality. The clusteriface.Cluster interface is designed for minimal implementation footprint. Cluster adds convenience methods around a clusteriface.Cluster to make it easier to use. Test authors should generally use this instead of coding against a clusteriface.Cluster directly.
func New ¶
func New(c clusteriface.Cluster) *Cluster
func (*Cluster) MustCleanup ¶
func (c *Cluster) MustCleanup()
func (*Cluster) MustNewNode ¶
func (*Cluster) MustNewNodes ¶
func (*Cluster) WithLogger ¶
func (c *Cluster) WithLogger(l *zap.SugaredLogger) *Cluster
type Node ¶
type Node struct { Node clusteriface.Node Ctx context.Context Log *zap.SugaredLogger }
Node wraps a clusteriface.Node and provides a lot of convenience functionality for working with nodes.
func (*Node) MustReadFile ¶
func (n *Node) MustReadFile(filePath string) io.ReadCloser
func (*Node) MustRun ¶
func (n *Node) MustRun(req clusteriface.StartProcRequest) *clusteriface.ProcessResult
func (*Node) MustStartProc ¶
func (n *Node) MustStartProc(req clusteriface.StartProcRequest) *Process
func (*Node) Run ¶
func (n *Node) Run(req clusteriface.StartProcRequest) (*clusteriface.ProcessResult, error)
Run starts the given command on the node and waits for the process to exit.
func (*Node) StartProc ¶
func (n *Node) StartProc(req clusteriface.StartProcRequest) (*Process, error)
type Process ¶
type Process struct { Ctx context.Context Process clusteriface.Process }
func (*Process) MustSignal ¶
func (*Process) MustWait ¶
func (p *Process) MustWait() *clusteriface.ProcessResult
func (*Process) Wait ¶
func (p *Process) Wait() (*clusteriface.ProcessResult, error)
Click to show internal directories.
Click to hide internal directories.