17 lines
472 B
Go
17 lines
472 B
Go
package installer
|
|
|
|
import "context"
|
|
|
|
// InstallResult contains information about an installed tool binary.
|
|
type InstallResult struct {
|
|
BinaryPath string // absolute path to installed binary
|
|
}
|
|
|
|
// Strategy is the abstraction for different install methods.
|
|
type Strategy interface {
|
|
// Install downloads/installs the tool binary. Blocks until done.
|
|
Install(ctx context.Context) (*InstallResult, error)
|
|
// Name returns a human-readable name for logging.
|
|
Name() string
|
|
}
|