Documentation
¶
Overview ¶
Package verify implements post-deployment StackKit verification.
Index ¶
Constants ¶
const (
HTTPProbeVantage = "verifier-host"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessService ¶
type AccessService struct {
Key string `json:"key"`
URL string `json:"url"`
ServiceRef string `json:"serviceRef,omitempty"`
RouteRef string `json:"routeRef,omitempty"`
WorkloadRef string `json:"workloadRef,omitempty"`
}
AccessService is a routable service endpoint.
type AccessSummary ¶
type AccessSummary struct {
Services []AccessService `json:"services"`
}
AccessSummary is the subset of command access metadata needed by verify.
type Check ¶
type Check struct {
Name string `json:"name"`
Status Status `json:"status"`
Target string `json:"target,omitempty"`
Message string `json:"message"`
}
Check is one post-deployment verification assertion.
type DockerClient ¶
type DockerClient interface {
IsInstalled() bool
IsRunning(context.Context) bool
GetStackKitContainers(context.Context) ([]docker.ContainerInfo, error)
GetContainerHealth(context.Context, string) (models.HealthStatus, error)
}
DockerClient is the Docker surface needed by the verifier.
type HTTPRouteProbe ¶
type HTTPRouteProbe struct {
Vantage string `json:"vantage"`
Key string `json:"key"`
ServiceRef string `json:"serviceRef,omitempty"`
RouteRef string `json:"routeRef,omitempty"`
WorkloadRef string `json:"workloadRef,omitempty"`
URL string `json:"url"`
Method string `json:"method"`
Reached bool `json:"reached"`
StatusCode int `json:"statusCode,omitempty"`
ObservedAt time.Time `json:"observedAt"`
FailureClass string `json:"failureClass,omitempty"`
Error string `json:"error,omitempty"`
}
HTTPRouteProbe is the reusable transport result consumed by both the legacy verify report and the native runtime-observation projection. The caller supplies only access-manifest targets; this package never discovers or invents routes.
func ProbeHTTPRoutes ¶
func ProbeHTTPRoutes(ctx context.Context, access *AccessSummary, client *http.Client) ([]HTTPRouteProbe, error)
ProbeHTTPRoutes performs bounded GET requests using the verifier host as the sole vantage. Redirects must remain on the same authority and HTTPS cannot be downgraded. A per-request result preserves failed probes so a caller can expose an honest unverified/blocked projection for each route.
type Input ¶
type Input struct {
Spec *models.StackSpec
State *models.DeploymentState
Docker DockerClient
Access *AccessSummary
Options Options
HTTP *http.Client
}
Input holds all dependencies and state for a local verification run.
type Report ¶
type Report struct {
Status Status `json:"status"`
StackKit string `json:"stackkit,omitempty"`
Mode string `json:"mode,omitempty"`
Remote bool `json:"remote,omitempty"`
TargetHost string `json:"targetHost,omitempty"`
GeneratedAt time.Time `json:"generatedAt"`
Checks []Check `json:"checks"`
}
Report is the machine-readable output of a verify run.