checkpoint

package
v1.0.0-cli.0...-4491760 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const Namespace = "checkpoint"

Variables

This section is empty.

Functions

func NewSPDYExecutor

func NewSPDYExecutor(urlStr string) (remotecommand.Executor, error)

Types

type Config

type Config struct {
	CPUPeriod                int64
	CPUQuota                 int64
	MemoryLimitBytes         int64
	CheckpointFileDir        string
	CheckpointTimeoutSeconds int64
	RegistryUser             string
	RegistryPass             string
	ListenAddr               string
	StatusRetentionPeriod    time.Duration
	ContainerReadyTimeout    time.Duration
	WaitAfterServerInit      time.Duration
}

type RemoteCMDExecutorFactory

type RemoteCMDExecutorFactory func(url string) (remotecommand.Executor, error)

type Server

type Server struct {
	checkpointv1alpha1.UnimplementedCheckpointServiceServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(service Service) *Server

type Service

type Service interface {
	CreateCheckpoint(ctx context.Context, baseRef name.Reference) (string, error)
	CheckpointStatus(checkpointID string) *status.Status
}

type ServiceImpl

type ServiceImpl struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(
	logger *slog.Logger,
	cfg Config,
	criService cri.Service,
	imgService image.Service,
	statusStore status.Store,
	newRemoteCMDExecutor RemoteCMDExecutorFactory,
	portAlloc *workload.PortAllocator,

) *ServiceImpl

func (*ServiceImpl) CheckpointStatus

func (s *ServiceImpl) CheckpointStatus(checkpointID string) *status.Status

func (*ServiceImpl) CollectGarbage

func (s *ServiceImpl) CollectGarbage(ctx context.Context) error

CollectGarbage removes all checkpoint tarballs and pods of checkpoint jobs that have failed or completed successfully.

func (*ServiceImpl) CreateCheckpoint

func (s *ServiceImpl) CreateCheckpoint(ctx context.Context, baseRef name.Reference) (string, error)

Jump to

Keyboard shortcuts

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