talos/pkg/machinery/api/machine/lifecycle.go
Mateusz Urbanek 15a5ec9985
feat: implement new install/upgrade API
Implement new minimal Install/Upgrade LifecycleService API with streaming
support for real-time progress reporting. Add protobuf definitions, gRPC
service implementation, and client bindings.

Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
2026-03-06 12:16:35 +01:00

21 lines
653 B
Go

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Package machine contains the machine service API definitions.
package machine
import "fmt"
// Fmt formats the pull progress status into a human-readable string.
func (s *LifecycleServiceInstallProgress) Fmt() string {
switch msg := s.GetResponse().(type) {
case *LifecycleServiceInstallProgress_Message:
return msg.Message
case *LifecycleServiceInstallProgress_ExitCode:
return fmt.Sprintf("Exit code: %d", msg.ExitCode)
}
return ""
}