http

package
v0.1.38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TaskName is the name of the HTTP request task
	TaskName string = "notification/http"
)

Variables

This section is empty.

Functions

func Make

func Make(t *v2alpha2.TaskSpec) (core.Task, error)

Make converts an spec to a task.

Types

type Inputs

type Inputs struct {
	URL           string                `json:"URL" yaml:"URL"`
	Method        *v2alpha2.MethodType  `json:"method,omitempty" yaml:"method,omitempty"`
	AuthType      *v2alpha2.AuthType    `json:"authType,omitempty" yaml:"authType,omitempty"`
	Secret        *string               `json:"secret,omitempty" yaml:"secret,omitempty"`
	Headers       []v2alpha2.NamedValue `json:"headers,omitempty" yaml:"headers,omitempty"`
	Body          *string               `json:"body,omitempty" yaml:"body,omitempty"`
	VersionInfo   []core.VersionInfo    `json:"versionInfo,omitempty" yaml:"versionInfo,omitempty"`
	IgnoreFailure *bool                 `json:"ignoreFailure,omitempty" yaml:"ignoreFailure,omitempty"`
}

Inputs contain the name and arguments of the task.

type Task

type Task struct {
	core.TaskMeta `json:",inline" yaml:",inline"`
	With          Inputs `json:"with" yaml:"with"`
}

Task encapsulates the task.

func (*Task) Run

func (t *Task) Run(ctx context.Context) error

Run the task. Ignores failures unless the task indicates ignoreFailures: false

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL