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 ¶
func CreatePermissionProfileFile ¶ added in v0.0.34
func CreatePermissionProfileFile(serverName string, permProfile *permissions.Profile) (string, error)
CreatePermissionProfileFile creates a temporary file with the permission profile
Types ¶
type Manager ¶
type Manager interface {
// GetContainer returns information about the named container.
GetContainer(ctx context.Context, name string) (*rt.ContainerInfo, error)
// 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
// RunContainer runs a container in the foreground.
RunContainer(ctx context.Context, runConfig *runner.RunConfig) error
// RunContainerDetached runs a container in the background.
RunContainerDetached(runConfig *runner.RunConfig) error
// RestartContainer restarts a previously stopped container.
RestartContainer(ctx context.Context, name string) error
}
Manager is responsible for managing the state of ToolHive-managed containers.
Click to show internal directories.
Click to hide internal directories.