refactor: delete wrappers superseded by live entry points

Remove controlplanerpc.NewClient (superseded by NewRPCClient), Loader.Overlay
(-config-overlay reaches Resolve directly), and setup.Run (RunParams is
the live entry point). Move ResolverFunc into a test file, since only
tests adapt functions to the egress Resolver.
This commit is contained in:
sam committed 2026-10-14 23:10:35 +11:00
1 parent c833b651a9
commit f537d5f8cd
5 files changed
+11 -26

No files matched your search

@@ -135,12 +135,6 @@ func validateOverlayPath(overlayPath, basePath string, baseIsDir bool) error {
return nil
}
// Overlay loads basePath, then replaces only the fields overlayPath sets. An
// empty overlayPath is equivalent to File.
func (l *Loader) Overlay(basePath, overlayPath string) (*Document, error) {
return l.overlayFile(basePath, overlayPath)
}
func (l *Loader) overlayFile(basePath, overlayPath string) (*Document, error) {
doc := &Document{}
@@ -70,14 +70,7 @@ type Params struct {
// SecretSink.
}
// Run drives the setup flow and returns the TOML edits to apply. It writes no
// files; the caller must load the result before installing it or committing
// secrets.
func Run(ctx context.Context, p Prompter, discovery ModelDiscovery, secrets SecretSink, existing ExistingValues) ([]tomlwrite.Edit, error) {
return RunParams(ctx, p, discovery, secrets, existing, Params{})
}
// RunParams is Run with the question sites pre-answered from params. A zero
// RunParams drives the setup flow with the question sites pre-answered from params. A zero
// Params behaves exactly like Run.
func RunParams(ctx context.Context, p Prompter, discovery ModelDiscovery, secrets SecretSink, existing ExistingValues, params Params) ([]tomlwrite.Edit, error) {
var edits []tomlwrite.Edit