Documentation
¶
Overview ¶
Package core hosts the special "core" plugin. Unlike data-source plugins, core is responsible for translating user-supplied configuration into the Computed-side fields of plugins.Data, and it also owns the parallel runner that drives every other plugin.
Index ¶
Constants ¶
const Name = "core"
Name returns the canonical plugin name.
Variables ¶
var Plugin plugins.Plugin = &corePlugin{}
Plugin is the singleton exported by this package so that engine code (or test setup) can call core.Plugin.Run directly without going through the registry.
Functions ¶
func RunPlugins ¶
RunPlugins executes every plugin registered in plugins that is not "core" itself, in parallel up to the supplied concurrency cap, and records each result (or recovered error) under pc.Data.Plugins. parallel <= 0 falls back to runtime.GOMAXPROCS(0) so callers can pass the user-supplied value verbatim.
The function never returns a non-nil error for an individual plugin failure: the failure is recorded inside pc.Data.Plugins so the engine's aggregation logic can decide whether to abort the request. A non-nil error from RunPlugins itself indicates infrastructure trouble (context cancellation, errgroup internals).
Non-fatal errors that a plugin records via Data.AppendError (e.g. the M4 indepth-GraphQL degraded path or the repositories paging batch-halving failure) remain on Data.Errors and are merged into Result.Errors by engine.Compute's collectPluginErrors. RunPlugins itself does not touch Data.Errors so the mutex-protected accumulator stays in one place.
Types ¶
This section is empty.