audit

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package audit provides health-check and freshness auditing for AI providers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditResult

type AuditResult struct {
	ProviderName string        `json:"provider_name"`
	ProviderType string        `json:"provider_type"`
	Model        string        `json:"model"`
	Healthy      bool          `json:"healthy"`
	Latency      time.Duration `json:"latency"`
	Error        string        `json:"error,omitempty"`
	AuditedAt    time.Time     `json:"audited_at"`
}

AuditResult holds the outcome of a single provider health check.

type ProviderAudit

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

ProviderAudit runs health checks against a set of providers.

func New

func New(infos []provider.ProviderInfo, provs []provider.Provider) *ProviderAudit

New creates a ProviderAudit from a list of ProviderInfo and their corresponding Provider instances. The infos slice provides metadata (name, type, model) while the provs slice provides the actual health-check targets. Both slices must have the same length and be in the same order.

func (*ProviderAudit) Run

func (pa *ProviderAudit) Run(ctx context.Context) ([]AuditResult, error)

Run executes health checks on all providers and returns the results.

Jump to

Keyboard shortcuts

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