MCPcopy Index your code
hub / github.com/devspace-sh/devspace / NewResolver

Function NewResolver

pkg/devspace/dependency/resolver.go:43–62  ·  view source on GitHub ↗

NewResolver creates a new resolver for resolving dependencies

(ctx devspacecontext.Context, configOptions *loader.ConfigOptions)

Source from the content-addressed store, hash-verified

41
42// NewResolver creates a new resolver for resolving dependencies
43func NewResolver(ctx devspacecontext.Context, configOptions *loader.ConfigOptions) ResolverInterface {
44 return &resolver{
45 DependencyGraph: graph.NewGraph(graph.NewNode(ctx.Config().Config().Name, &Dependency{
46 name: ctx.Config().Config().Name,
47 absolutePath: ctx.Config().Path(),
48 localConfig: ctx.Config(),
49 dependencyConfig: &latest.DependencyConfig{
50 Name: ctx.Config().Config().Name,
51 },
52 dependencyCache: ctx.Config().LocalCache(),
53 kubeClient: ctx.KubeClient(),
54 root: true,
55 })),
56
57 BaseConfig: ctx.Config().Config(),
58 BaseCache: ctx.Config().LocalCache(),
59
60 ConfigOptions: configOptions,
61 }
62}
63
64// Resolve implements interface
65func (r *resolver) Resolve(ctx devspacecontext.Context, options ResolveOptions) ([]types.Dependency, error) {

Callers 3

TestResolverFunction · 0.70
NewManagerFunction · 0.70
NewManagerWithParserFunction · 0.70

Calls 6

NewGraphFunction · 0.92
NewNodeFunction · 0.92
ConfigMethod · 0.65
PathMethod · 0.65
LocalCacheMethod · 0.65
KubeClientMethod · 0.65

Tested by 1

TestResolverFunction · 0.56