lifecycle

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: May 9, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package lifecycle contains high-level logic for managing the lifecycle of ToolHive-managed containers.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrContainerNotFound   = fmt.Errorf("container not found")
	ErrContainerNotRunning = fmt.Errorf("container not running")
)

ErrContainerNotFound is returned when a container cannot be found by name.

Functions

This section is empty.

Types

type Manager

type Manager interface {
	// ListContainers lists all ToolHive-managed containers.
	ListContainers(ctx context.Context, listAll bool) ([]rt.ContainerInfo, error)
	// DeleteContainer deletes a container and its associated proxy process.
	DeleteContainer(ctx context.Context, name string, forceDelete bool) error
	// StopContainer stops a container and its associated proxy process.
	StopContainer(ctx context.Context, name string) error
}

Manager is responsible for managing the state of ToolHive-managed containers. TODO: add Run and Restart here. This requires refactoring of the run code.

func NewManager

func NewManager(ctx context.Context) (Manager, error)

NewManager creates a new container manager instance.

Jump to

Keyboard shortcuts

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