runtime

package
v0.1.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager manages multiple runtime types

func NewManager

func NewManager(cacheDir string) (*Manager, error)

NewManager creates a new runtime manager

func (*Manager) Clean

func (m *Manager) Clean(runtime string) error

Clean removes all cached versions of a runtime

func (*Manager) CleanAll

func (m *Manager) CleanAll() error

CleanAll removes all cached runtimes

func (*Manager) Get

func (m *Manager) Get(ctx context.Context, runtime, version string) (string, error)

Get downloads and installs a specific runtime version

func (*Manager) GetInstalled

func (m *Manager) GetInstalled() ([]RuntimeInfo, error)

GetInstalled returns all installed runtime versions

func (*Manager) GetLatest

func (m *Manager) GetLatest(ctx context.Context, runtime string) (string, error)

GetLatest downloads and installs the latest version of a runtime

func (*Manager) List

func (m *Manager) List(ctx context.Context, runtime string) ([]types.Version, error)

List returns available versions for a runtime

func (*Manager) ListRuntimes

func (m *Manager) ListRuntimes() []string

ListRuntimes returns all registered runtime names

func (*Manager) Register

func (m *Manager) Register(runtime types.Runtime)

Register adds a new runtime to the manager

type RuntimeInfo

type RuntimeInfo struct {
	Name    string
	Version string
	Path    string
}

RuntimeInfo provides information about an installed runtime

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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