Internal

internal/app/fail

Package fail records failed lifecycle state and its reason.

import "github.com/nilstate/scafld/v2/internal/app/fail"

Package fail records failed lifecycle state and its reason.

Functions

func Run(ctx context.Context, specs SpecStore, sessions SessionStore, clock Clock, taskID string, reason string) (spec.Model, error)

Source: internal/app/fail/fail.go:26

Run marks a task failed and records failure evidence.

Types

type Clock

Source: internal/app/fail/fail.go:23

Clock supplies failure timestamps.

type Clock interface{ Now() time.Time }
Methods
  • Now func() time.Time

type SessionStore

Source: internal/app/fail/fail.go:18

SessionStore is the session evidence port used by failure.

type SessionStore interface {
	Append(context.Context, string, session.Entry, string) (session.Session, error)
}
Methods
  • Append func(context.Context, string, session.Entry, string) (session.Session, error)

type SpecStore

Source: internal/app/fail/fail.go:12

SpecStore is the spec persistence port used by failure.

type SpecStore interface {
	Load(context.Context, string) (spec.Model, string, error)
	Save(context.Context, string, spec.Model) error
}
Methods
  • Load func(context.Context, string) (spec.Model, string, error)
  • Save func(context.Context, string, spec.Model) error