Documentation
¶
Index ¶
- Variables
- func Command(workDir, command string, args ...string) (string, error)
- func MkDir(dir string) error
- func RandomResource(rs []*types.Resource) (*types.Resource, error)
- func SSHKeyPath() string
- func Unzip(filePath, destDir string) (err error)
- func Wget(rawURL string, dest string) (string, error)
- type CommandError
- type DockerExecutor
- type SSHConfig
- type SSHExecutor
Constants ¶
This section is empty.
Variables ¶
View Source
var Addr string
Addr specifies api_server listening address
View Source
var AwsAccessKeyID string
AwsAccessKeyID specifies S3 access key id
View Source
var AwsSecretAccessKey string
AwsSecretAccessKey specifies S3 secret access key
View Source
var ErrContainerExitNonZero = fmt.Errorf("container exit with non zero")
ErrContainerExitNonZero ...
View Source
var S3Endpoint string
S3Endpoint specifies s3 object storage address
Functions ¶
func RandomResource ¶
RandomResource ...
Types ¶
type CommandError ¶
CommandError saves command execution error
func (*CommandError) Error ¶
func (c *CommandError) Error() string
type DockerExecutor ¶
DockerExecutor encapsulate docker client executor
func NewDockerExecutor ¶
func NewDockerExecutor(host string) (*DockerExecutor, error)
NewDockerExecutor ...
func (*DockerExecutor) RmContainer ¶
func (d *DockerExecutor) RmContainer(containerID string) error
RmContainer rms container
type SSHConfig ¶
type SSHConfig struct { Host string // hostname of the SSH server Port uint // port of the SSH server User string // username to login to the SSH server Password string // password of the user KeyFile string // path to the private key file Passphrase string // passphrase of the private key file // Timeout is the maximum wait time for the TCP connection to establish Timeout time.Duration }
SSHConfig ...
type SSHExecutor ¶
type SSHExecutor struct {
Config *easyssh.MakeConfig
}
SSHExecutor ...
func NewSSHExecutor ¶
func NewSSHExecutor(c SSHConfig) SSHExecutor
NewSSHExecutor creates a ssh executor
Click to show internal directories.
Click to hide internal directories.