contractrunner

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package contractrunner queues Barometer contract test runs with bounded concurrency.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildBarometerClientConfig

func BuildBarometerClientConfig(ct *config.ContractTestsConfig, workspaceRoot string) *barometer.ClientConfig

BuildBarometerClientConfig maps contractTests (timeouts, TLS paths) to a Barometer client config. workspaceRoot is used to resolve relative paths for TLS PEM files.

func RunArazzoSync

func RunArazzoSync(ctx context.Context, cfg *barometer.Config, clientCfg *barometer.ClientConfig) (*barometer.Result, error)

RunArazzoSync runs Arazzo workflows via Barometer config (file paths).

func RunOpenAPISync

func RunOpenAPISync(ctx context.Context, baseURL, specPath string, navIdx *navigator.Index, creds map[string]string, tags []string, operationID string, clientCfg *barometer.ClientConfig, runner *Runner) (*barometer.Result, []wiretap.WiretapFinding, error)

RunOpenAPISync runs OpenAPI contract tests synchronously.

func StartOpenAPIAsync

func StartOpenAPIAsync(ctx context.Context, baseURL, specPath string, navIdx *navigator.Index, creds map[string]string, tags []string, operationID string, clientCfg *barometer.ClientConfig, runner *Runner) (*barometer.Job, error)

StartOpenAPIAsync starts contract tests in the background.

Types

type Runner

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

Runner limits concurrent contract test executions.

func New

func New(cfg *config.Config) *Runner

New creates a runner. cfg may be nil (defaults apply).

func (*Runner) Acquire

func (r *Runner) Acquire(ctx context.Context) error

Acquire waits for a worker slot or ctx cancellation.

func (*Runner) Config

func (r *Runner) Config() *config.Config

Config returns the telescope config snapshot.

func (*Runner) EnsureWiretap

func (r *Runner) EnsureWiretap(ctx context.Context, workspaceRoot, specPath, baseURL string, wtCfg config.WiretapConfig) error

EnsureWiretap starts a fresh sidecar for the supplied spec/base URL pair.

func (*Runner) Release

func (r *Runner) Release()

Release returns a worker slot (call after Acquire).

func (*Runner) SetConfig

func (r *Runner) SetConfig(cfg *config.Config)

SetConfig updates the config used for EffectiveConcurrency and related settings.

func (*Runner) StopWiretap

func (r *Runner) StopWiretap()

StopWiretap stops the active sidecar, if any.

func (*Runner) WiretapMonitorURL

func (r *Runner) WiretapMonitorURL() string

WiretapMonitorURL returns the active sidecar monitor URL, if any.

Jump to

Keyboard shortcuts

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