Documentation ¶
Overview ¶
Package `durootwf` implements the du-root ephemeral workflow, which runs the Unix command `du` on an FSO root.
Workflow Events ¶
The workflow is initialized with `WorkflowEvent_EV_FSO_DU_ROOT_STARTED` on the workflow aggregated and a corresponding `WorkflowEvent_EV_FSO_DU_ROOT_STARTED` on the ephemeral workflow index.
Nogfsostad observes the workflow and posts the `du` output as multiple `WorkflowEvent_EV_FSO_DU_UPDATED` events, followed by `WorkflowEvent_EV_FSO_DU_ROOT_COMPLETED`.
Nogfsostad commits the workflow, which stores `WorkflowEvent_EV_FSO_DU_ROOT_COMPLETED` on the workflow index and a final `WorkflowEvent_EV_FSO_DU_ROOT_COMMITTED` on the workflow.
The final workflow event has no observable side effect. Its only purpose is to explicitly confirm termination of the workflow history. The final event may be missing if a multi-step command to complete the workflow gets interrupted.
Index ¶
- Constants
- Variables
- type Advancer
- type Behavior
- type CmdAbortExpired
- type CmdAppend
- type CmdCommit
- type CmdDelete
- type CmdEnd
- type CmdFail
- type CmdInit
- type Event
- type State
- type StateCode
- type Workflows
- func (r *Workflows) AbortExpired(id uuid.I, vid ulid.I) (ulid.I, error)
- func (r *Workflows) Append(id uuid.I, vid ulid.I, cmd *CmdAppend) (ulid.I, error)
- func (r *Workflows) Commit(id uuid.I, vid ulid.I) (ulid.I, error)
- func (w *Workflows) Delete(id uuid.I, vid ulid.I) error
- func (r *Workflows) End(id uuid.I, vid ulid.I) (ulid.I, error)
- func (r *Workflows) Fail(id uuid.I, vid ulid.I, code int32, message string) (ulid.I, error)
- func (r *Workflows) FindId(id uuid.I) (*State, error)
- func (r *Workflows) Init(id uuid.I, cmd *CmdInit) (ulid.I, error)
Constants ¶
const StatusCodeExpired = 104
Use same value as `GetSplitRootO_SC_EXPIRED` in case we want to unify in the future.
Variables ¶
var ErrConflictInit = errors.New("workflow init conflict")
var ErrConflictState = errors.New("command conflicts with current state")
var ErrConflictStateAdvanced = errors.New("workflow state has advanced")
var ErrInvalidCommand = errors.New("invalid workflow command")
var ErrInvalidEventType = errors.New("invalid event type")
var ErrUninitialized = errors.New("workflow uninitialized")
var NoVC = events.NoVC
var RetryNoVC = events.RetryNoVC
Functions ¶
This section is empty.
Types ¶
type Advancer ¶
type Advancer struct {
// contains filtered or unexported fields
}
The bools indicate which part of the state has been duplicated.
type CmdAbortExpired ¶
type CmdAbortExpired struct{}
func (*CmdAbortExpired) AggregateCommand ¶
func (*CmdAbortExpired) AggregateCommand()
type CmdAppend ¶
func (*CmdAppend) AggregateCommand ¶
func (*CmdAppend) AggregateCommand()
type CmdCommit ¶
type CmdCommit struct{}
func (*CmdCommit) AggregateCommand ¶
func (*CmdCommit) AggregateCommand()
type CmdDelete ¶
type CmdDelete struct{}
func (*CmdDelete) AggregateCommand ¶
func (*CmdDelete) AggregateCommand()
type CmdEnd ¶
type CmdEnd struct{}
func (*CmdEnd) AggregateCommand ¶
func (*CmdEnd) AggregateCommand()
type CmdFail ¶
func (*CmdFail) AggregateCommand ¶
func (*CmdFail) AggregateCommand()
type CmdInit ¶
func (*CmdInit) AggregateCommand ¶
func (*CmdInit) AggregateCommand()
type Event ¶
func (*Event) UnmarshalProto ¶
type State ¶
type State struct {
// contains filtered or unexported fields
}
func (*State) AggregateState ¶
func (*State) AggregateState()