gotools/internal/imports/mod_cache.go

type directoryPackageStatus

const _

const directoryScanned

const nameLoaded

const exportsLoaded

type directoryPackageInfo

// reachedStatus returns true when info has a status at least target and any error associated with
// an attempt to reach target.
func (info *directoryPackageInfo) reachedStatus(target directoryPackageStatus) (bool, error) {}

type DirInfoCache

func NewDirInfoCache() *DirInfoCache {}

type cacheListener

// ScanAndListen calls listener on all the items in the cache, and on anything
// newly added. The returned stop function waits for all in-flight callbacks to
// finish and blocks new ones.
func (d *DirInfoCache) ScanAndListen(ctx context.Context, listener cacheListener) func() {}

// Store stores the package info for dir.
func (d *DirInfoCache) Store(dir string, info directoryPackageInfo) {}

// Load returns a copy of the directoryPackageInfo for absolute directory dir.
func (d *DirInfoCache) Load(dir string) (directoryPackageInfo, bool) {}

// Keys returns the keys currently present in d.
func (d *DirInfoCache) Keys() (keys []string) {}

func (d *DirInfoCache) CachePackageName(info directoryPackageInfo) (string, error) {}

func (d *DirInfoCache) CacheExports(ctx context.Context, env *ProcessEnv, info directoryPackageInfo) (string, []stdlib.Symbol, error) {}

// ScanModuleCache walks the given directory, which must be a GOMODCACHE value,
// for directory package information, storing the results in cache.
func ScanModuleCache(dir string, cache *DirInfoCache, logf func(string, ...any)) {}