Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BootProcess ¶
type BootProcess struct { // Do not mutate these values from the outside, the mutability // is owned by BootProcess itself. CurrentState *types.State Log Log }
BootProcess represents an imaginary/virtual process of booting a machine. Given a flow it will replay all the expected actions, and it will be possible to analyze what happened in result.
func NewBootProcess ¶
func NewBootProcess(state *types.State) *BootProcess
NewBootProcess returns a new instance of BootProcess.
func (*BootProcess) Finish ¶
func (process *BootProcess) Finish(ctx context.Context)
Finish executes all the rest steps.
func (*BootProcess) NextStep ¶
func (process *BootProcess) NextStep(ctx context.Context) bool
BootProcess executes the current step and switches to pointer to the next step.
func (*BootProcess) String ¶
func (process *BootProcess) String() string
String implements fmt.Stringer.
type ErroredSteps ¶
type ErroredSteps []*StepResult
ErroredSteps is an implementation of `error` given a log of errored steps.
type Log ¶
type Log []StepResult
Log is a slice of StepResult.
func (Log) GetDataMeasuredWith ¶
func (log Log) GetDataMeasuredWith(trustChain types.TrustChain) types.MeasuredDataSlice
GetDataMeasuredWith returns all the data which was measured.
func (Log) IssuesCount ¶
IssuesCount returns the total amount of issues.
type StepIssue ¶
type StepIssue struct { Coords StepIssueCoords Issue error }
StepIssue is an error returned by a Step.
type StepIssueCoords ¶
type StepIssueCoords any
StepIssueCoords helps to find a specific place where an issue occurred, within a types.Step.
Currently may contain either StepIssueCoordsActor or StepIssueCoordsAction.
type StepIssueCoordsAction ¶
type StepIssueCoordsAction struct {
ActionIndex uint
}
StepIssueCoordsAction implies that the issue happened during execution of an action with the defined index (the positional number within the types.Step).
func (StepIssueCoordsAction) String ¶
func (i StepIssueCoordsAction) String() string
String implements fmt.Stringer.
type StepIssueCoordsActions ¶
type StepIssueCoordsActions struct{}
StepIssueCoordsAction implies that the issue happened during getting Actions from the Step.
func (StepIssueCoordsActions) String ¶
func (i StepIssueCoordsActions) String() string
String implements fmt.Stringer.
type StepIssueCoordsActor ¶
type StepIssueCoordsActor struct{}
StepIssueCoordsActor implies that the issue happened during execution of Actor-specific logic (currently it is only method `ResponsibleCode`).
func (StepIssueCoordsActor) String ¶
func (StepIssueCoordsActor) String() string
String implements fmt.Stringer.
type StepResult ¶
type StepResult struct { Actor types.Actor ActorCode *types.Data Step types.Step Actions types.Actions MeasuredData types.MeasuredDataSlice Issues StepIssues }
StepResult is the outcome of a single Step execution.