Documentation
¶
Overview ¶
Package engine orchestrates the load → fetch → compare pipeline that powers kube-diff. It exposes the comparison core as importable functions so that out-of-tree consumers (for example an in-cluster drift-detection controller) can reuse the exact same diff logic without depending on the CLI layer, stdout rendering, or os.Exit behavior.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compare ¶
func Compare( ctx context.Context, fetcher cluster.ResourceFetcher, resources []source.Resource, opts diff.CompareOptions, ) ([]*diff.Result, error)
Compare compares each already-loaded local resource against the live cluster state using the given fetcher, returning one Result per resource. A resource absent from the cluster is reported with StatusNew. It performs no filtering and no output rendering — callers decide what to do with the structured results.
func Run ¶
func Run( ctx context.Context, src source.Source, fetcher cluster.ResourceFetcher, opts diff.CompareOptions, ) ([]*diff.Result, error)
Run is a convenience wrapper that loads resources from src and then compares them against the cluster via Compare. It is the simplest entry point for consumers that do not need the CLI's intermediate filtering step.
Types ¶
This section is empty.