Documentation
¶
Index ¶
- func GetAllExecutors() []string
- func GetSchema(name string) (interface{}, error)
- func RegisterExecutor(name string, factory NewExecutorFunc)
- func RegisterSchema(name string, schema interface{})
- type ExecutionContext
- type Executor
- type LocalLinuxDriver
- func (d *LocalLinuxDriver) Close() error
- func (d *LocalLinuxDriver) CreateDir(ctx context.Context, path string) error
- func (d *LocalLinuxDriver) CreateFile(ctx context.Context, path string) error
- func (d *LocalLinuxDriver) Dial(network, address string) (net.Conn, error)
- func (d *LocalLinuxDriver) Download(ctx context.Context, remotePath, localPath string) error
- func (d *LocalLinuxDriver) Exec(ctx context.Context, command string, workingDir string, env []string, ...) error
- func (d *LocalLinuxDriver) GetWorkingDirectory() string
- func (d *LocalLinuxDriver) IsRemote() bool
- func (d *LocalLinuxDriver) Join(parts ...string) string
- func (d *LocalLinuxDriver) ListFiles(ctx context.Context, dirPath string) ([]string, error)
- func (d *LocalLinuxDriver) Remove(ctx context.Context, path string) error
- func (d *LocalLinuxDriver) SetPermissions(ctx context.Context, path string, perms os.FileMode) error
- func (d *LocalLinuxDriver) TempDir() string
- func (d *LocalLinuxDriver) Upload(ctx context.Context, localPath, remotePath string) error
- type NewExecutorFunc
- type Node
- type NodeAuth
- type NodeDriver
- type RemoteLinuxDriver
- func (d *RemoteLinuxDriver) Close() error
- func (d *RemoteLinuxDriver) CreateDir(ctx context.Context, dirPath string) error
- func (d *RemoteLinuxDriver) CreateFile(ctx context.Context, filePath string) error
- func (d *RemoteLinuxDriver) Dial(network, address string) (net.Conn, error)
- func (d *RemoteLinuxDriver) Download(ctx context.Context, remotePath, localPath string) error
- func (d *RemoteLinuxDriver) Exec(ctx context.Context, command string, workingDir string, env []string, ...) error
- func (d *RemoteLinuxDriver) GetWorkingDirectory() string
- func (d *RemoteLinuxDriver) IsRemote() bool
- func (d *RemoteLinuxDriver) Join(parts ...string) string
- func (d *RemoteLinuxDriver) ListFiles(ctx context.Context, dirPath string) ([]string, error)
- func (d *RemoteLinuxDriver) Remove(ctx context.Context, filePath string) error
- func (d *RemoteLinuxDriver) SetPermissions(ctx context.Context, filePath string, perms os.FileMode) error
- func (d *RemoteLinuxDriver) TempDir() string
- func (d *RemoteLinuxDriver) Upload(ctx context.Context, localPath, remotePath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllExecutors ¶
func GetAllExecutors() []string
func RegisterExecutor ¶
func RegisterExecutor(name string, factory NewExecutorFunc)
RegisterExecutor should be called by executor modules their init() function.
func RegisterSchema ¶
func RegisterSchema(name string, schema interface{})
RegisterSchema should be called by executor modules to register their config schema
Types ¶
type ExecutionContext ¶
type LocalLinuxDriver ¶
type LocalLinuxDriver struct {
// contains filtered or unexported fields
}
func (*LocalLinuxDriver) Close ¶
func (d *LocalLinuxDriver) Close() error
func (*LocalLinuxDriver) CreateDir ¶
func (d *LocalLinuxDriver) CreateDir(ctx context.Context, path string) error
func (*LocalLinuxDriver) CreateFile ¶
func (d *LocalLinuxDriver) CreateFile(ctx context.Context, path string) error
func (*LocalLinuxDriver) Dial ¶
func (d *LocalLinuxDriver) Dial(network, address string) (net.Conn, error)
func (*LocalLinuxDriver) Download ¶
func (d *LocalLinuxDriver) Download(ctx context.Context, remotePath, localPath string) error
func (*LocalLinuxDriver) GetWorkingDirectory ¶
func (d *LocalLinuxDriver) GetWorkingDirectory() string
func (*LocalLinuxDriver) IsRemote ¶
func (d *LocalLinuxDriver) IsRemote() bool
func (*LocalLinuxDriver) Join ¶
func (d *LocalLinuxDriver) Join(parts ...string) string
func (*LocalLinuxDriver) Remove ¶
func (d *LocalLinuxDriver) Remove(ctx context.Context, path string) error
func (*LocalLinuxDriver) SetPermissions ¶
func (*LocalLinuxDriver) TempDir ¶
func (d *LocalLinuxDriver) TempDir() string
type NewExecutorFunc ¶
type NewExecutorFunc func(name string, driver NodeDriver) (Executor, error)
NewExecutorFunc defines the signature for a function that can create an executor.
func GetNewExecutorFunc ¶
func GetNewExecutorFunc(name string) (NewExecutorFunc, error)
GetNewExecutorFunc is used to retrieve the NewExecutorFunc for an executor
type NodeDriver ¶
type NodeDriver interface {
Upload(ctx context.Context, localPath, remotePath string) error
Download(ctx context.Context, remotePath, localPath string) error
CreateDir(ctx context.Context, path string) error
CreateFile(ctx context.Context, path string) error
GetWorkingDirectory() string
Remove(ctx context.Context, path string) error
SetPermissions(ctx context.Context, path string, perms os.FileMode) error
Exec(ctx context.Context, command string, workingDir string, env []string, stdout, stderr io.Writer) error
Dial(network, address string) (net.Conn, error)
IsRemote() bool
TempDir() string
Join(parts ...string) string
// ListFiles should only return top level files and no directories
ListFiles(ctx context.Context, dirPath string) ([]string, error)
Close() error
}
func NewLocalLinux ¶
func NewLocalLinux() (NodeDriver, error)
func NewNodeDriver ¶
func NewNodeDriver(ctx context.Context, node Node) (NodeDriver, error)
func NewRemoteLinux ¶
func NewRemoteLinux(client remoteclient.RemoteClient) (NodeDriver, error)
type RemoteLinuxDriver ¶
type RemoteLinuxDriver struct {
// contains filtered or unexported fields
}
func (*RemoteLinuxDriver) Close ¶
func (d *RemoteLinuxDriver) Close() error
func (*RemoteLinuxDriver) CreateDir ¶
func (d *RemoteLinuxDriver) CreateDir(ctx context.Context, dirPath string) error
func (*RemoteLinuxDriver) CreateFile ¶
func (d *RemoteLinuxDriver) CreateFile(ctx context.Context, filePath string) error
func (*RemoteLinuxDriver) Dial ¶
func (d *RemoteLinuxDriver) Dial(network, address string) (net.Conn, error)
func (*RemoteLinuxDriver) Download ¶
func (d *RemoteLinuxDriver) Download(ctx context.Context, remotePath, localPath string) error
func (*RemoteLinuxDriver) GetWorkingDirectory ¶
func (d *RemoteLinuxDriver) GetWorkingDirectory() string
func (*RemoteLinuxDriver) IsRemote ¶
func (d *RemoteLinuxDriver) IsRemote() bool
func (*RemoteLinuxDriver) Join ¶
func (d *RemoteLinuxDriver) Join(parts ...string) string
func (*RemoteLinuxDriver) Remove ¶
func (d *RemoteLinuxDriver) Remove(ctx context.Context, filePath string) error
func (*RemoteLinuxDriver) SetPermissions ¶
func (*RemoteLinuxDriver) TempDir ¶
func (d *RemoteLinuxDriver) TempDir() string
Click to show internal directories.
Click to hide internal directories.