command

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2019 License: Apache-2.0 Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Starter

type Starter struct {
	// Name identify the Starter instance.
	Name string

	// Home is the temporary working home.
	Home string
	// contains filtered or unexported fields
}

Starter is a set of all components' starter. It provides an easy way to manager processes and recycle resources for integration testing. For example:

type ExampleSuite struct {
    starter *Starter
}

func (s *ExampleSuite) SetUpSuite(c *check.C) {
    s.starter = NewStarter("ExampleSuite")
}

func (s *ExampleSuite) TearDownSuite(c *check.C) {
    s.starter.Clean()
}

func NewStarter

func NewStarter(name string) *Starter

NewStarter create an instance of Starter. It checks the binary files whether is existing and creates a temporary directory for testing.

func (*Starter) Clean

func (s *Starter) Clean()

Clean cleans all temporary directories and processes.

func (*Starter) DFDaemon

func (s *Starter) DFDaemon(running time.Duration, port int) (*exec.Cmd, error)

DFDaemon starts dfdaemon.

func (*Starter) DFGet

func (s *Starter) DFGet(running time.Duration, args ...string) (*exec.Cmd, error)

DFGet starts dfget.

func (*Starter) DFGetServer

func (s *Starter) DFGetServer(running time.Duration, args ...string) (*exec.Cmd, error)

DFGetServer starts dfget as a peer server.

func (*Starter) Kill

func (s *Starter) Kill(cmd *exec.Cmd)

Kill shutdown one process.

func (*Starter) KillAll

func (s *Starter) KillAll()

KillAll shutdown all running processes.

func (*Starter) Supernode

func (s *Starter) Supernode(running time.Duration, args ...string) (
	cmd *exec.Cmd, err error)

Supernode starts supernode.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL