Documentation ¶
Index ¶
- Variables
- type IRuntime
- type Runtimes
- func (r *Runtimes) Discover(ctx context.Context) error
- func (r *Runtimes) EnsureInstalled(ctx context.Context, runtime string) error
- func (r *Runtimes) Get(runtime string) (IRuntime, error)
- func (r *Runtimes) GetInstall(ctx context.Context, runtime string) (IRuntime, error)
- func (r *Runtimes) List() []string
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
This section is empty.
Types ¶
type IRuntime ¶
type IRuntime interface { // Parse will parse string with module name. It is used only on `toolset add` step. // Parse should: // 1) ensure that this program is valid, exists, and can be installed. // 2) normalize program name and return a canonical name. Parse(ctx context.Context, str string) (string, error) // GetModule returns an information about module (parsed module). GetModule(ctx context.Context, program string) (*structs.ModuleInfo, error) // Install will install the program. Install(ctx context.Context, program string) error Run(ctx context.Context, program string, args ...string) error GetLatest(ctx context.Context, module string) (string, bool, error) Remove(ctx context.Context, tool structs.Tool) error }
type Runtimes ¶
type Runtimes struct {
// contains filtered or unexported fields
}
func (*Runtimes) EnsureInstalled ¶ added in v0.25.2
func (*Runtimes) GetInstall ¶
GetInstall will get installed runtime or try to install it in other case.
Click to show internal directories.
Click to hide internal directories.