Documentation
¶
Overview ¶
Package noop implements a no-operation executor for testing hibernation workflows without external dependencies. It simulates realistic operations with configurable delays and failure modes, making it ideal for local development and testing.
Index ¶
- Constants
- type Executor
- func (e *Executor) Shutdown(ctx context.Context, log logr.Logger, spec executor.Spec) (*executor.Result, error)
- func (e *Executor) Type() string
- func (e *Executor) Validate(spec executor.Spec) error
- func (e *Executor) WakeUp(ctx context.Context, log logr.Logger, spec executor.Spec, ...) (*executor.Result, error)
- type Parameters
- type RestoreState
Constants ¶
View Source
const ExecutorType = "noop"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct{}
Executor implements the NoOp hibernation logic.
func (*Executor) Shutdown ¶
func (e *Executor) Shutdown(ctx context.Context, log logr.Logger, spec executor.Spec) (*executor.Result, error)
Shutdown simulates hibernation with configurable delay and failure modes.
type Parameters ¶
type Parameters = executorparams.NoOpParameters
Parameters is an alias for the shared NoOp parameter type.
type RestoreState ¶
type RestoreState struct {
// Parameters are the original parameters passed to the executor
Parameters Parameters `json:"parameters"`
// OperationTime records when the shutdown operation was performed
OperationTime time.Time `json:"operationTime"`
// GeneratedID is a unique identifier for this operation
GeneratedID string `json:"generatedId"`
// TargetName echoes back the target name for verification
TargetName string `json:"targetName"`
}
RestoreState holds NoOp restore data that echoes back parameters and operation metadata.
Click to show internal directories.
Click to hide internal directories.