resolver

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package resolver provides pack binary resolution and caching.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PackConfig

type PackConfig struct {
	Name    string
	Source  string
	Version string
}

PackConfig represents configuration for a remote pack to resolve.

type Resolver

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

Resolver downloads, caches, and resolves pack binaries.

func NewResolver

func NewResolver(dataDir string) (*Resolver, error)

NewResolver creates a new Resolver caching packs under <dataDir>/packs/.

func NewResolverWithCacheDir

func NewResolverWithCacheDir(cacheDir string) (*Resolver, error)

NewResolverWithCacheDir creates a new Resolver with a custom cache directory.

func (*Resolver) CacheDir

func (r *Resolver) CacheDir() string

CacheDir returns the cache directory path.

func (*Resolver) GetManifest

func (r *Resolver) GetManifest(ctx context.Context, packPath string) (*pack.ManifestResponse, error)

GetManifest calls the pack's manifest command and parses the response.

func (*Resolver) Resolve

func (r *Resolver) Resolve(ctx context.Context, cfg PackConfig) (string, error)

Resolve returns the path to a remote pack binary, downloading if needed.

Jump to

Keyboard shortcuts

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