Documentation ¶
Overview ¶
Copyright 2018 F5 Networks
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2018 F5 Networks ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func DecodeResults(result []byte, logger log.Logger) (actions.ActionResult, error)
- func DecodeStepResults(ctx variables.Context, logger log.Logger) (results []actions.ActionResult, err error)
- func ExecuteStep(executor Executor, step workflow.WorkflowStep, job *pwe.Job, ...) actions.ActionResult
- func FileOrURLReader(taskFilename string, logger log.Logger) (reader io.Reader, err error)
- func NewStepResult(result actions.ActionStatus, message string) actions.ActionResult
- func NextStep(step workflow.WorkflowStep, code actions.ActionStatus) string
- func ParseContext(data []byte) (ctx variables.Context, err error)
- func ParseJob(data []byte) (job *pwe.Job, err error)
- type Executor
- type Job
- type JobResult
- type NotifyHook
- type NotifyHooks
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeResults ¶
func DecodeStepResults ¶
func ExecuteStep ¶
func ExecuteStep(executor Executor, step workflow.WorkflowStep, job *pwe.Job, ctx variables.Context, logger log.Logger, notifierHooks *NotifyHooks, extraEnv map[string]string, volumes []string) actions.ActionResult
func FileOrURLReader ¶ added in v0.0.2
func NewStepResult ¶
func NewStepResult(result actions.ActionStatus, message string) actions.ActionResult
func NextStep ¶
func NextStep(step workflow.WorkflowStep, code actions.ActionStatus) string
func ParseContext ¶ added in v0.0.2
Types ¶
type Executor ¶ added in v1.2.2
type Executor interface { Prepare(job *pwe.Job) error CreateJob(inputData, correlationId, jobName, stepName, runId string, action actions.Action, labels map[string]string, volumes []string) error GetJob() Job AttachIO() error SendInput(inputData string) error ProcessOutput(resultText *string) Wait(timeout time.Duration) (int, error) Cleanup() error }
func NewDockerExecutor ¶ added in v1.2.2
type Job ¶ added in v1.2.2
type Job interface { ID() string Input(input io.WriteCloser) io.WriteCloser Output(output io.ReadCloser) io.ReadCloser }
type JobResult ¶
type JobResult struct { ID string `json:"correlation_id" yaml:"correlation_id"` Name string `json:"task_name" yaml:"task_name"` Status pwe.JobStatus `json:"status" yaml:"status"` Message string `json:"message" yaml:"message"` NotifyStatus string `json:"notify_status" yaml:"notify_status"` NotifyMessage string `json:"notify_message" yaml:"notify_message"` }
func ExecuteJob ¶
type NotifyHook ¶ added in v1.2.2
func NewConsoleHook ¶ added in v1.2.2
func NewConsoleHook(logger log.Logger) NotifyHook
func NewHTTPNotifyHook ¶ added in v1.2.2
func NewHTTPNotifyHook(baseURL string, logger log.Logger) NotifyHook
type NotifyHooks ¶ added in v1.2.2
type NotifyHooks []NotifyHook
func (*NotifyHooks) AddNotification ¶ added in v1.2.2
func (h *NotifyHooks) AddNotification(hook NotifyHook)
func (NotifyHooks) FireNotification ¶ added in v1.2.2
func (h NotifyHooks) FireNotification(job *pwe.Job) error