command

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpBuildCommand

type HttpBuildCommand struct {
	// contains filtered or unexported fields
}

func NewHttpBuildCommand

func NewHttpBuildCommand(method, url, body string, headers []string, scope *scope.Scope, hctx *hsruntime.Context) (cmd *HttpBuildCommand, nextScope *scope.Scope, err error)

func (*HttpBuildCommand) Run

func (h *HttpBuildCommand) Run(ctx context.Context, in record.Record, binds *scope.Bindings) (out record.Stream, outBinds *scope.Bindings, err error)

type HttpCommand

type HttpCommand struct {
	// contains filtered or unexported fields
}

func NewHttpCommand

func NewHttpCommand(method, url, body string, headers []string, scope *scope.Scope, hctx *hsruntime.Context, retry RetryFunc) (cmd *HttpCommand, nextScope *scope.Scope, err error)

func (*HttpCommand) Run

func (h *HttpCommand) Run(ctx context.Context, in record.Record, binds *scope.Bindings) (out record.Stream, outBinds *scope.Bindings, err error)

func (*HttpCommand) SetDryRun added in v0.1.8

func (h *HttpCommand) SetDryRun()

SetDryRun causes subsequent calls to run to immediately respond with status code 000 and human-readable error message. In-flight requests are unaffected.

type HttpRunCommand

type HttpRunCommand struct {
	// contains filtered or unexported fields
}

func NewHttpRunCommand

func NewHttpRunCommand(scope *scope.Scope, hctx *hsruntime.Context, retry RetryFunc) (cmd *HttpRunCommand, nextScope *scope.Scope, finalErr error)

func (*HttpRunCommand) Run

func (h *HttpRunCommand) Run(ctx context.Context, in record.Record, binds *scope.Bindings) (out record.Stream, outBinds *scope.Bindings, err error)

func (*HttpRunCommand) SetDryRun added in v0.1.8

func (h *HttpRunCommand) SetDryRun()

SetDryRun causes subsequent calls to run to immediately respond with status code 000 and human-readable error message. In-flight requests are unaffected.

type RequestAndBody

type RequestAndBody struct {
	*http.Request
	BodyContent string
}

type ResponseAndBody

type ResponseAndBody struct {
	*http.Response
	BodyContent string
	HTTPError   error
}

type RetryFunc

type RetryFunc func(req RequestAndBody, resp ResponseAndBody, attempt int) (backoff time.Duration, retry bool)

Jump to

Keyboard shortcuts

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