celllifecycle

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package celllifecycle contains shared cell lifecycle orchestration used by the CLI and the local web interface. kukeond remains authoritative for the actual state transitions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Phase

type Phase string

Phase identifies the step at which a restart failed.

const (
	PhaseLookup     Phase = "lookup"
	PhaseValidation Phase = "validation"
	PhaseStopping   Phase = "stopping"
	PhaseStarting   Phase = "starting"
)

type PhaseError

type PhaseError struct {
	Phase        Phase
	StoppedFirst bool
	Err          error
}

PhaseError preserves the daemon error while identifying the restart step. Error deliberately returns the original message so the CLI keeps its existing error text while HTTP clients can present the failure stage.

func (*PhaseError) Error

func (e *PhaseError) Error() string

func (*PhaseError) Unwrap

func (e *PhaseError) Unwrap() error

type RestartResult

type RestartResult struct {
	Cell         v1beta1.CellDoc
	StoppedFirst bool
}

RestartResult describes the path taken by the CLI-compatible restart. StoppedFirst is true only when a Ready cell completed StopCell before the start step. Cell is the daemon's result from the final successful RPC.

func Restart

func Restart(ctx context.Context, client kukeonv1.Client, doc v1beta1.CellDoc) (RestartResult, error)

Restart matches `kuke restart` for one fully scoped cell. Ready cells are stopped and then started. Stopped, Exited, Error, Failed, and Degraded cells go directly through StartCell so kukeond can choose the appropriate recovery path. Pending and Unknown cells are rejected.

Jump to

Keyboard shortcuts

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