Documentation
¶
Overview ¶
Package runner provides the shared generation pipeline used by cmd/generate and cmd/regen.
Index ¶
- func ResolveGenerationContextFactory(licenseElection, licenseTokenPath string, getenv func(string) string) func() (context.Context, error)
- func ResolveTraceDest(flagValue string) string
- func ResolveWatchTemplatesDir(flagLocation string, flagWatch bool, logger *logging.ZapLogger) string
- func Run(cfg RunConfig)
- type RunConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveGenerationContextFactory ¶ added in v2.934.0
func ResolveTraceDest ¶
ResolveTraceDest merges the trace destination from the environment and a flag override.
func ResolveWatchTemplatesDir ¶
func ResolveWatchTemplatesDir(flagLocation string, flagWatch bool, logger *logging.ZapLogger) string
ResolveWatchTemplatesDir resolves the template-watching directory from flags and environment variables. Returns the resolved directory path, or "" if template watching is not enabled.
Types ¶
type RunConfig ¶
type RunConfig struct {
SpanName string // OTel span name ("main" for generate, "regen" for regen)
GenOpts generate.GenerateOptions // passed to generate.Generate()
TraceDest string // merged OTel destination (caller merges flag + env)
ProfileDir string // profiling output dir (empty = disabled)
ValidateIntegrity bool // run post-generation checksum check
Logger *logging.ZapLogger // concrete logger (needed for Fatal)
GenerationContextFactory func() (context.Context, error) // explicit access context; direct when nil
}
RunConfig holds everything the shared pipeline needs. Each cmd populates this after its own flag-parsing / inference phase.
Click to show internal directories.
Click to hide internal directories.