MCPcopy Create free account
hub / github.com/celer-pkg/celer / NewRepoConfig

Function NewRepoConfig

pkgcache/cache_repo.go:22–33  ·  view source on GitHub ↗
(ctx context.Context, writable bool)

Source from the content-addressed store, hash-verified

20}
21
22func NewRepoConfig(ctx context.Context, writable bool) *RepoConfig {
23 pkgCacheConfig := ctx.PkgCacheConfig()
24 if pkgCacheConfig == nil || pkgCacheConfig.GetDir(context.PkgCacheDirRoot) == "" {
25 return nil
26 }
27
28 return &RepoConfig{
29 ctx: ctx,
30 writable: writable,
31 chattrFS: fileio.NewChattrFS(pkgCacheConfig.GetDir(context.PkgCacheDirRoot)),
32 }
33}
34
35// Store packs a source tree into repo cache.
36// - for archive sources, repoDir is the source dir in buildtrees.

Callers 4

RefreshMethod · 0.92
GetRepoCacheMethod · 0.92
GetRepoCacheMethod · 0.85
newRepoConfigFunction · 0.85

Calls 3

NewChattrFSFunction · 0.92
PkgCacheConfigMethod · 0.65
GetDirMethod · 0.65

Tested by 3

GetRepoCacheMethod · 0.74
GetRepoCacheMethod · 0.68
newRepoConfigFunction · 0.68