Documentation
¶
Overview ¶
Package failurestate admits collaborator failures into closed policy values shared by transfer orchestration and lane scheduling. Diagnostics cannot grant cancellation, retry or output-retirement authority after this boundary.
Index ¶
- func BoundaryError(failure *Failure, diagnostic error) error
- func ContentFault(err error) (fault.Fault, bool)
- func Diagnostic(err error) error
- func Err(failure *Failure) error
- func FaultOf(err error) fault.Fault
- func IsCancellation(ctx context.Context, err error) bool
- func Join(candidates ...error) error
- func SessionTerminal(err error) bool
- type Failure
- func Admit(err error) (*Failure, bool)
- func ContextCause(ctx context.Context) *Failure
- func DependencyContract(cause error) *Failure
- func FromCancellation(ctx context.Context, diagnostic error) *Failure
- func JoinClosed(candidates ...*Failure) *Failure
- func Merge(current *Failure, candidates ...error) *Failure
- func New(value fault.Fault, diagnostic error) *Failure
- func Normalize(ctx context.Context, err error, classify boundaryFaultClassifier) *Failure
- func Reduce(candidates ...error) *Failure
- func Require(err error) *Failure
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoundaryError ¶
BoundaryError projects an internal normalized reduction back across an error-returning port without leaking internal failure provenance.
func ContentFault ¶
ContentFault classifies source evidence independently of transport teardown. Each caller supplies its own terminal errors after admitting this evidence.
func Diagnostic ¶
func IsCancellation ¶
IsCancellation inspects an immediate collaborator result before admitting its policy.
func SessionTerminal ¶
Types ¶
type Failure ¶
type Failure struct {
// contains filtered or unexported fields
}
Failure keeps the closed policy state distinct from its raw diagnostic. It deliberately has no Unwrap method, so code outside the immediate boundary cannot reinterpret the diagnostic graph as authority.
func Admit ¶
Admit accepts only the direct concrete carrier produced by this package. The dynamic-type gate prevents errors.As from granting policy authority to an arbitrary wrapper while still using the standard admission API after that exactness proof.
func ContextCause ¶
func DependencyContract ¶
func JoinClosed ¶
func Normalize ¶
Normalize admits an immediate collaborator result once. Policy code receives Failure and therefore cannot recover authority from wrapping shape or joined error topology.