Documentation ¶
Index ¶
- Constants
- type Interface
- type LocalTask
- func (l *LocalTask) Default()
- func (l *LocalTask) Execute() *ending.TaskResult
- func (l *LocalTask) ExecuteRollback()
- func (l *LocalTask) ExecuteWithRetry(runtime connector.Runtime, host connector.Host) error
- func (l *LocalTask) GetDesc() string
- func (l *LocalTask) Init(runtime connector.Runtime, moduleCache *cache.Cache, ...)
- func (l *LocalTask) Run(runtime connector.Runtime, host connector.Host, resCh chan error)
- func (l *LocalTask) RunWithTimeout(runtime connector.Runtime, host connector.Host)
- func (l *LocalTask) When(runtime connector.Runtime) (bool, error)
- func (l *LocalTask) WhenWithRetry(runtime connector.Runtime, host connector.Host) (bool, error)
- type RemoteTask
- func (t *RemoteTask) ConfigureSelfRuntime(runtime connector.Runtime, host connector.Host, index int) error
- func (t *RemoteTask) Default()
- func (t *RemoteTask) Execute() *ending.TaskResult
- func (t *RemoteTask) ExecuteRollback()
- func (t *RemoteTask) ExecuteWithRetry(runtime connector.Runtime) error
- func (t *RemoteTask) GetDesc() string
- func (t *RemoteTask) Init(runtime connector.Runtime, moduleCache *cache.Cache, ...)
- func (t *RemoteTask) RollbackWithTimeout(ctx context.Context, runtime connector.Runtime, host connector.Host, index int, ...)
- func (t *RemoteTask) Run(runtime connector.Runtime, host connector.Host, index int, resCh chan error)
- func (t *RemoteTask) RunRollback(runtime connector.Runtime, host connector.Host, index int, ...)
- func (t *RemoteTask) RunWithTimeout(ctx context.Context, runtime connector.Runtime, host connector.Host, index int, ...)
- func (t *RemoteTask) When(runtime connector.Runtime) (bool, error)
- func (t *RemoteTask) WhenWithRetry(runtime connector.Runtime) (bool, error)
Constants ¶
View Source
const ( DefaultTimeout = 120 DefaultCon = 10 DefaultTaskName = "DefaultTask" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalTask ¶
type LocalTask struct { Name string Desc string Prepare prepare.Prepare Action action.Action Rollback rollback.Rollback Retry int Delay time.Duration Timeout time.Duration PipelineCache *cache.Cache ModuleCache *cache.Cache Runtime connector.Runtime IgnoreError bool TaskResult *ending.TaskResult // contains filtered or unexported fields }
func (*LocalTask) Execute ¶
func (l *LocalTask) Execute() *ending.TaskResult
func (*LocalTask) ExecuteRollback ¶
func (l *LocalTask) ExecuteRollback()
func (*LocalTask) ExecuteWithRetry ¶
func (*LocalTask) RunWithTimeout ¶
type RemoteTask ¶
type RemoteTask struct { Name string Desc string Hosts []connector.Host Prepare prepare.Prepare Action action.Action Rollback rollback.Rollback Parallel bool Retry int Delay time.Duration Timeout time.Duration Concurrency float64 PipelineCache *cache.Cache ModuleCache *cache.Cache Runtime connector.Runtime IgnoreError bool TaskResult *ending.TaskResult }
func (*RemoteTask) ConfigureSelfRuntime ¶
func (*RemoteTask) Default ¶
func (t *RemoteTask) Default()
func (*RemoteTask) Execute ¶
func (t *RemoteTask) Execute() *ending.TaskResult
func (*RemoteTask) ExecuteRollback ¶
func (t *RemoteTask) ExecuteRollback()
func (*RemoteTask) ExecuteWithRetry ¶
func (t *RemoteTask) ExecuteWithRetry(runtime connector.Runtime) error
func (*RemoteTask) GetDesc ¶
func (t *RemoteTask) GetDesc() string
func (*RemoteTask) RollbackWithTimeout ¶
func (*RemoteTask) RunRollback ¶
func (t *RemoteTask) RunRollback(runtime connector.Runtime, host connector.Host, index int, result *ending.ActionResult, resCh chan error)
func (*RemoteTask) RunWithTimeout ¶
func (*RemoteTask) WhenWithRetry ¶
func (t *RemoteTask) WhenWithRetry(runtime connector.Runtime) (bool, error)
Click to show internal directories.
Click to hide internal directories.