http

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RetryStrategyFixed       = "fixed"
	RetryStrategyExponential = "exponential"
	DefaultTimeout           = time.Second * 30
	MaxTimeout               = time.Second * 30
	RetryMinInterval         = time.Second * 5
	RetryMaxInterval         = time.Minute * 5
	RetryMaxAttempts         = 30

	SuccessOutputChannel = "success"
	FailureOutputChannel = "failure"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTP

type HTTP struct{}

func (*HTTP) Actions

func (e *HTTP) Actions() []core.Action

func (*HTTP) Cancel

func (e *HTTP) Cancel(ctx core.ExecutionContext) error

func (*HTTP) Cleanup added in v0.7.0

func (e *HTTP) Cleanup(ctx core.SetupContext) error

func (*HTTP) Color

func (e *HTTP) Color() string

func (*HTTP) Configuration

func (e *HTTP) Configuration() []configuration.Field

func (*HTTP) Description

func (e *HTTP) Description() string

func (*HTTP) Documentation added in v0.1.6

func (e *HTTP) Documentation() string

func (*HTTP) ExampleOutput added in v0.0.45

func (e *HTTP) ExampleOutput() map[string]any

func (*HTTP) Execute

func (e *HTTP) Execute(ctx core.ExecutionContext) error

func (*HTTP) HandleAction

func (e *HTTP) HandleAction(ctx core.ActionContext) error

func (*HTTP) HandleWebhook

func (e *HTTP) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)

func (*HTTP) Icon

func (e *HTTP) Icon() string

func (*HTTP) Label

func (e *HTTP) Label() string

func (*HTTP) Name

func (e *HTTP) Name() string

func (*HTTP) OutputChannels

func (e *HTTP) OutputChannels(configuration any) []core.OutputChannel

func (*HTTP) ProcessQueueItem

func (e *HTTP) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*HTTP) Setup

func (e *HTTP) Setup(ctx core.SetupContext) error
type Header struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type KeyValue

type KeyValue struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Metadata added in v0.12.0

type Metadata struct {
	TimeoutSeconds int            `json:"timeoutSeconds" mapstructure:"timeoutSeconds"`
	Retry          *RetryMetadata `json:"retry" mapstructure:"retry"`
}

type RetryMetadata added in v0.0.18

type RetryMetadata struct {
	Strategy     string  `json:"strategy"`
	Interval     int     `json:"interval"`
	Attempts     int     `json:"attempts"`
	MaxAttempts  int     `json:"maxAttempts"`
	LastResponse string  `json:"lastResponse"`
	LastStatus   *int    `json:"lastStatus,omitempty"`
	LastError    string  `json:"lastError"`
	NextRetryAt  *string `json:"nextRetryAt,omitempty"`
}

type RetrySpec added in v0.12.0

type RetrySpec struct {
	Enabled         bool   `json:"enabled" mapstructure:"enabled"`
	Strategy        string `json:"strategy" mapstructure:"strategy"`
	MaxAttempts     int    `json:"maxAttempts" mapstructure:"maxAttempts"`
	IntervalSeconds int    `json:"intervalSeconds" mapstructure:"intervalSeconds"`
}

type Spec

type Spec struct {
	Method         string      `json:"method"`
	URL            string      `json:"url"`
	QueryParams    *[]KeyValue `json:"queryParams,omitempty"`
	Headers        *[]Header   `json:"headers,omitempty"`
	ContentType    *string     `json:"contentType,omitempty"`
	JSON           *any        `json:"json,omitempty"`
	XML            *string     `json:"xml,omitempty"`
	Text           *string     `json:"text,omitempty"`
	FormData       *[]KeyValue `json:"formData,omitempty"`
	TimeoutSeconds *int        `json:"timeoutSeconds,omitempty"`
	Retry          *RetrySpec  `json:"retry,omitempty"`
	SuccessCodes   *string     `json:"successCodes,omitempty"`
}

func (*Spec) GetSuccessCodes added in v0.12.0

func (s *Spec) GetSuccessCodes() string

func (*Spec) Timeout added in v0.12.0

func (s *Spec) Timeout() time.Duration

Jump to

Keyboard shortcuts

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