NewResolver creates a new resolver for resolving dependencies
(ctx devspacecontext.Context, configOptions *loader.ConfigOptions)
| 41 | |
| 42 | // NewResolver creates a new resolver for resolving dependencies |
| 43 | func 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 |
| 65 | func (r *resolver) Resolve(ctx devspacecontext.Context, options ResolveOptions) ([]types.Dependency, error) { |