Internal
internal/app/cancel
Package cancel records cancellation lifecycle state.
import "github.com/nilstate/scafld/v2/internal/app/cancel"
Package cancel records cancellation lifecycle state.
Functions
func Run(ctx context.Context, specs SpecStore, sessions SessionStore, clock Clock, taskID string, reason string) (spec.Model, error)
Source: internal/app/cancel/cancel.go:26
Run marks a task cancelled and records cancellation evidence.
Types
type Clock
Source: internal/app/cancel/cancel.go:23
Clock supplies cancellation timestamps.
type Clock interface{ Now() time.Time }Methods
Now func() time.Time
type SessionStore
Source: internal/app/cancel/cancel.go:18
SessionStore is the session evidence port used by cancellation.
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/cancel/cancel.go:12
SpecStore is the spec persistence port used by cancellation.
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
