Documentation
¶
Overview ¶
Package contractrunner queues Barometer contract test runs with bounded concurrency.
Index ¶
- func BuildBarometerClientConfig(ct *config.ContractTestsConfig, workspaceRoot string) *barometer.ClientConfig
- func RunArazzoSync(ctx context.Context, cfg *barometer.Config, clientCfg *barometer.ClientConfig) (*barometer.Result, error)
- func RunOpenAPISync(ctx context.Context, baseURL, specPath string, navIdx *navigator.Index, ...) (*barometer.Result, []wiretap.WiretapFinding, error)
- func StartOpenAPIAsync(ctx context.Context, baseURL, specPath string, navIdx *navigator.Index, ...) (*barometer.Job, error)
- type Runner
- func (r *Runner) Acquire(ctx context.Context) error
- func (r *Runner) Config() *config.Config
- func (r *Runner) EnsureWiretap(ctx context.Context, workspaceRoot, specPath, baseURL string, ...) error
- func (r *Runner) Release()
- func (r *Runner) SetConfig(cfg *config.Config)
- func (r *Runner) StopWiretap()
- func (r *Runner) WiretapMonitorURL() string
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 (*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 ¶
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 ¶
WiretapMonitorURL returns the active sidecar monitor URL, if any.