command

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: MIT Imports: 16 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)

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)

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