runner

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package runner provides HTTP client and execution for contract tests and Arazzo workflows.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*http.Client
	// Auth adds headers (e.g. Authorization, X-API-Key) to every request when set.
	Auth func(*http.Request)
}

Client is an HTTP client configured for contract test runs (timeouts, optional retries, auth).

func NewClient

func NewClient(cfg *Config) *Client

NewClient returns a new runner client with the given config.

func (*Client) Do

func (c *Client) Do(ctx context.Context, req *http.Request) (*http.Response, error)

Do sends the request and returns the response. It respects context cancellation and applies Auth if set.

type Config

type Config struct {
	Timeout       time.Duration // request timeout; 0 = 30s default
	MaxConns      int           // max idle conns per host; 0 = default
	SkipTLSVerify bool          // skip TLS verification (insecure)
	// Auth applies to every request (e.g. Bearer token, API key header).
	Auth func(*http.Request)
}

Config configures the runner client.

Jump to

Keyboard shortcuts

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