httpclient

package
v0.0.0-...-ef3af43 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRunnerHttpClient

func NewRunnerHttpClient(clientConfig *RunnerHttpClientConfig) (*http.Client, error)

Types

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

HTTPClient is an interface for http.Client that enables mocking

type Provider

type Provider interface {
	NewDefaultClient() (HTTPClient, error)
	NewClient(runnerConfig *RunnerHttpClientConfig) (HTTPClient, error)
}

Provider can be used by action handlers to create HTTP clients

func NewDefaultProvider

func NewDefaultProvider(runnerConfig *config.Config, opts ...ProviderOption) Provider

type ProviderOption

type ProviderOption func(*defaultHTTPClientProvider)

ProviderOption configures optional behavior on the default HTTP client provider.

func WithURLAllowlistDisabled

func WithURLAllowlistDisabled() ProviderOption

WithURLAllowlistDisabled disables URL allowlist enforcement on all clients created by this provider.

type RunnerHttpClient

type RunnerHttpClient struct{}

type RunnerHttpClientConfig

type RunnerHttpClientConfig struct {
	MaxRedirect        int
	Transport          *RunnerHttpTransportConfig
	AllowIMDSEndpoints bool
	HTTPTimeout        time.Duration
}

type RunnerHttpTransportConfig

type RunnerHttpTransportConfig struct {
	InsecureSkipVerify bool
}

Jump to

Keyboard shortcuts

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