Documentation ¶
Overview ¶
Package actions contains the high level workflow actions
Index ¶
- Variables
- func DirExists(filename string) bool
- func FileExists(filename string) bool
- func FormatDuration(duration time.Duration) string
- type Action
- func NewArchivePathAction(name string, files ...string) Action
- func NewCLIAction(msg, cmd string, args ...string) Action
- func NewCopyFileAction(from, to string) Action
- func NewCopyPathAction(from, to string) Action
- func NewCreateDirectoryAction(path string) Action
- func NewDeletePathAction(path string) Action
- func NewErrorAction(err error, msg string) Action
- func NewFetchFileAction(filePath, path string) Action
- func NewFetchFileActionWithHTTPClient(filePath, path string, client *http.Client) Action
- func NewPrintAction(msg string) Action
- func NewRenamePathAction(from, to string) Action
- func NewSleepAction(duration, msg string) Action
- func NewUnArchiveAction(name, path string) Action
- type ActionContext
- type Actions
Constants ¶
This section is empty.
Variables ¶
var AzureENVPrefix = "AZURE"
AzureENVPrefix docs nolint:gochecknoglobals
Functions ¶
func FileExists ¶
FileExists returns true if the file exists and is not a directory.
func FormatDuration ¶
FormatDuration format duration string.
Types ¶
type Action ¶
type Action interface {
Execute(ctx ActionContext) error
}
Action documentation.
func NewArchivePathAction ¶ added in v1.5.0
NewArchivePathAction documentation.
func NewCLIAction ¶ added in v1.5.0
NewCLIAction run a cli command as an action.
func NewCopyFileAction ¶ added in v1.2.0
NewCopyFileAction documentation.
func NewCopyPathAction ¶ added in v1.5.0
NewCopyPathAction documentation.
func NewCreateDirectoryAction ¶
NewCreateDirectoryAction documentation.
func NewDeletePathAction ¶ added in v1.5.0
NewDeletePathAction documentation.
func NewFetchFileAction ¶ added in v1.5.0
NewFetchFileAction will download a path to a local file. It's efficient because it will write as it downloads and not load the whole file into memory. accepted scheme are http/https and azure the azure schema is a special format `azure://<azure storage account>/<azure container name>/<azure path to blob> eg azure://example/my-container/some/file/path the http equivalent would be https://example.blob.core.windows.net/my-container/some/file/path
func NewFetchFileActionWithHTTPClient ¶ added in v1.5.0
NewFetchFileActionWithHTTPClient will download a path to a local file. It's efficient because it will write as it downloads and not load the whole file into memory. accepted scheme are http/https and azure the azure schema is a special format `azure://<azure storage account>/<azure container name>/<azure path to blob> eg azure://example/my-container/some/file/path the http equivalent would be https://example.blob.core.windows.net/my-container/some/file/path
func NewRenamePathAction ¶ added in v1.5.0
NewRenamePathAction documentation.
func NewUnArchiveAction ¶ added in v1.5.0
NewUnArchiveAction documentation.
type ActionContext ¶ added in v1.0.1
type ActionContext interface { context.Context Logger() log.Logger Status() *term.Status IsDryRun() bool Data() interface{} // Builder functions WithCancel() (ActionContext, context.CancelFunc) WithDeadline(d time.Time) (ActionContext, context.CancelFunc) WithTimeout(timeout time.Duration) (ActionContext, context.CancelFunc) WithValue(key, val interface{}) ActionContext }
ActionContext docs.
func NewDefaultActionContext ¶ added in v1.0.1
func NewDefaultActionContext(logger log.Logger, dryRun bool) ActionContext
NewDefaultActionContext generate a default action context with a nil return for Data().
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package log same as https://github.com/kubernetes-sigs/kind/tree/master/pkg/log
|
Package log same as https://github.com/kubernetes-sigs/kind/tree/master/pkg/log |
Package term same as https://github.com/kubernetes-sigs/kind/tree/master/pkg/internal/env
|
Package term same as https://github.com/kubernetes-sigs/kind/tree/master/pkg/internal/env |