Internal
internal/core/gate
Package gate defines deterministic failure payloads for lifecycle gates.
import "github.com/nilstate/scafld/v2/internal/core/gate"
Package gate defines deterministic failure payloads for lifecycle gates.
Functions
func New(cause error, failure Failure) Error
Source: internal/core/gate/failure.go:25
New returns an error that can be matched with errors.Is/As and rendered by automation-facing adapters.
Types
type Error
Source: internal/core/gate/failure.go:18
Error wraps a cause with a deterministic gate failure payload.
type Error struct {
Cause error
Failure Failure
}Fields
Cause errorFailure Failure
func Error) Error() string
Source: internal/core/gate/failure.go:30
Error returns the human-readable cause plus gate reason.
func Unwrap() error
Source: internal/core/gate/failure.go:41
Unwrap exposes the underlying cause for errors.Is.
type Failure
Source: internal/core/gate/failure.go:6
Failure is the machine-readable repair contract for a blocked gate.
type Failure struct {
Gate string `json:"gate"`
Status string `json:"status,omitempty"`
Reason string `json:"reason"`
Evidence []string `json:"evidence,omitempty"`
Expected string `json:"expected,omitempty"`
Actual string `json:"actual,omitempty"`
Blockers []string `json:"blockers,omitempty"`
Next string `json:"next,omitempty"`
}Fields
Gate string`json:"gate"`Status string`json:"status,omitempty"`Reason string`json:"reason"`Evidence []string`json:"evidence,omitempty"`Expected string`json:"expected,omitempty"`Actual string`json:"actual,omitempty"`Blockers []string`json:"blockers,omitempty"`Next string`json:"next,omitempty"`
