Documentation
¶
Overview ¶
Package `unfreezerepowf` implements the unfreeze-repo ephemeral workflow.
Workflow Events ¶
Some events have a suffix `2` to distinguish them from events that were used in an earlier, experimental implementation (see NOE-23).
The workflow is initiated by gRPC `BeginUnfreezeRepo()`. It starts the workflow with `WorkflowEvent_EV_FSO_UNFREEZE_REPO_STARTED_2` on the workflow and a corresponding `WorkflowEvent_EV_FSO_UNFREEZE_REPO_STARTED_2` on the ephemeral registry workflow index.
Nogfsoregd observes the workflow. It changes the repo state to freezing in the registry with `RegistryEvent_EV_FSO_UNFREEZE_REPO_STARTED_2` and on the repo with `RepoEvent_EV_FSO_UNFREEZE_REPO_STARTED_2`. It then posts `WorkflowEvent_EV_FSO_UNFREEZE_REPO_FILES_STARTED` on the workflow to notify Nogfsostad.
Nogfsostad observes the workflow. It unsets the immutable file attributes, commits the shadow repo, and posts `WorkflowEvent_EV_FSO_UNFREEZE_REPO_FILES_COMPLETED` on the workflow.
Nogfsoregd then completes the workflow: `RepoEvent_EV_FSO_UNFREEZE_REPO_COMPLETED_2` on the repo, `RegistryEvent_EV_FSO_UNFREEZE_REPO_COMPLETED_2` on the registry, `WorkflowEvent_EV_FSO_UNFREEZE_REPO_COMPLETED_2` on the workflow, `WorkflowEvent_EV_FSO_UNFREEZE_REPO_COMPLETED_2` on the ephemeral registry workflow index, and a final `WorkflowEvent_EV_FSO_UNFREEZE_REPO_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 was interrupted.
The workflow is eventually deleted from the index with `WorkflowEvent_EV_FSO_UNFREEZE_REPO_DELETED` on the ephemeral registry workflow index. A workflow may be deleted with or without the final workflow event.
Index ¶
- Variables
- func IsPackageError(err error) bool
- type Advancer
- type AlreadyTerminatedError
- type Behavior
- type CmdAbort
- type CmdAbortFiles
- type CmdBeginFiles
- type CmdCommit
- type CmdCommitFiles
- type CmdEnd
- type CmdInit
- type Event
- type EventTypeError
- type InvalidCommandError
- type JournalError
- type NewEventsError
- type NotIdempotentError
- type State
- func (*State) AggregateState()
- func (s *State) Id() uuid.I
- func (st *State) RegistryId() uuid.I
- func (st *State) RegistryName() string
- func (st *State) RepoGlobalPath() string
- func (st *State) RepoId() uuid.I
- func (s *State) SetVid(vid ulid.I)
- func (st *State) StateCode() StateCode
- func (st *State) StatusCode() int32
- func (st *State) StatusMessage() string
- func (s *State) Vid() ulid.I
- type StateCode
- type StateConflictError
- type UninitializedError
- type Workflows
- func (r *Workflows) Abort(id uuid.I, vid ulid.I, code int32, message string) (ulid.I, error)
- func (r *Workflows) AbortFiles(id uuid.I, vid ulid.I, code int32, message string) (ulid.I, error)
- func (r *Workflows) BeginFiles(id uuid.I, vid ulid.I) (ulid.I, error)
- func (r *Workflows) Commit(id uuid.I, vid ulid.I) (ulid.I, error)
- func (r *Workflows) CommitFiles(id uuid.I, vid ulid.I) (ulid.I, error)
- func (r *Workflows) End(id uuid.I, vid ulid.I) (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 ¶
This section is empty.
Variables ¶
var NoVC = events.NoVC
var RetryNoVC = events.RetryNoVC
Functions ¶
func IsPackageError ¶
Types ¶
type Advancer ¶
type Advancer struct {
// contains filtered or unexported fields
}
The bools indicate which part of the state has been duplicated.
type AlreadyTerminatedError ¶
type AlreadyTerminatedError struct{}
func (*AlreadyTerminatedError) Error ¶
func (err *AlreadyTerminatedError) Error() string
type CmdAbort ¶
func (*CmdAbort) AggregateCommand ¶
func (*CmdAbort) AggregateCommand()
type CmdAbortFiles ¶
func (*CmdAbortFiles) AggregateCommand ¶
func (*CmdAbortFiles) AggregateCommand()
type CmdBeginFiles ¶
type CmdBeginFiles struct{}
func (*CmdBeginFiles) AggregateCommand ¶
func (*CmdBeginFiles) AggregateCommand()
type CmdCommit ¶
type CmdCommit struct{}
func (*CmdCommit) AggregateCommand ¶
func (*CmdCommit) AggregateCommand()
type CmdCommitFiles ¶
type CmdCommitFiles struct{}
func (*CmdCommitFiles) AggregateCommand ¶
func (*CmdCommitFiles) AggregateCommand()
type CmdEnd ¶
type CmdEnd struct{}
func (*CmdEnd) AggregateCommand ¶
func (*CmdEnd) AggregateCommand()
type CmdInit ¶
type CmdInit struct { RegistryId uuid.I RegistryName string StartRegistryVid ulid.I RepoId uuid.I RepoGlobalPath string StartRepoVid ulid.I AuthorName string AuthorEmail string }
func (*CmdInit) AggregateCommand ¶
func (*CmdInit) AggregateCommand()
type Event ¶
func (*Event) UnmarshalProto ¶
type EventTypeError ¶
type EventTypeError struct{}
func (*EventTypeError) Error ¶
func (err *EventTypeError) Error() string
type InvalidCommandError ¶
type InvalidCommandError struct{}
func (*InvalidCommandError) Error ¶
func (err *InvalidCommandError) Error() string
type JournalError ¶
type JournalError struct {
Err error
}
func (*JournalError) Error ¶
func (err *JournalError) Error() string
func (*JournalError) Unwrap ¶
func (err *JournalError) Unwrap() error
type NewEventsError ¶
type NewEventsError struct {
Err error
}
func (*NewEventsError) Error ¶
func (err *NewEventsError) Error() string
func (*NewEventsError) Unwrap ¶
func (err *NewEventsError) Unwrap() error
type NotIdempotentError ¶
type NotIdempotentError struct { }
func (*NotIdempotentError) Error ¶
func (err *NotIdempotentError) Error() string
type State ¶
type State struct {
// contains filtered or unexported fields
}
func (*State) AggregateState ¶
func (*State) AggregateState()
func (*State) RegistryId ¶
func (*State) RegistryName ¶
func (*State) RepoGlobalPath ¶
func (*State) StatusCode ¶
func (*State) StatusMessage ¶
type StateConflictError ¶
type StateConflictError struct{}
func (*StateConflictError) Error ¶
func (err *StateConflictError) Error() string
type UninitializedError ¶
type UninitializedError struct{}
func (*UninitializedError) Error ¶
func (err *UninitializedError) Error() string
type Workflows ¶
type Workflows struct {
// contains filtered or unexported fields
}