phase

package
v0.12.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PhasedObject

type PhasedObject interface {
	client.Object
	core.ConditionObject

	GetPhase() hephv1.Phase
	SetPhase(p hephv1.Phase)
}

type TransitionConditions

type TransitionConditions struct {
	Initialize func() (string, string)
	Running    func() (string, string)
	Success    func() (string, string)
}

type TransitionHelper

type TransitionHelper struct {
	Client         client.Client
	ConditionMeta  TransitionConditions
	ReadyCondition string
}

func (*TransitionHelper) SetFailed

func (h *TransitionHelper) SetFailed(ctx *core.Context, obj PhasedObject, err error) error

SetFailed transitions the object to the Failed phase and persists it. It returns the status-write error (nil on success), NOT the passed-in build error: a non-nil return means the terminal transition was not durably recorded and the reconcile should be retried. err is used only to populate the failure condition message.

func (*TransitionHelper) SetInitializing

func (h *TransitionHelper) SetInitializing(ctx *core.Context, obj PhasedObject)

func (*TransitionHelper) SetRunning

func (h *TransitionHelper) SetRunning(ctx *core.Context, obj PhasedObject)

func (*TransitionHelper) SetSucceeded

func (h *TransitionHelper) SetSucceeded(ctx *core.Context, obj PhasedObject) error

SetSucceeded transitions the object to the Succeeded phase and persists it, returning the status-write error (nil on success). Callers should treat a non-nil return as a non-durable terminal transition — the phase was not recorded and the reconcile should be retried before acting on the transition (e.g. emitting a terminal-outcome metric).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL