Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDiffer ¶
func NewDiffer(preRs *git.RepoSpec, postRs *git.RepoSpec, epds []entrypoint.EntrypointFactory, opts ...DifferOption) *repoDiffer
NewDiffer creates a new Differ instance with the given repository specifications and entrypoint factories. Optional functional options can be provided to configure the Differ's behavior, such as adding tracing support.
Types ¶
type Differ ¶
type Differ interface {
Extract(context.Context, plumbing.ReferenceName) ([]EntrypointDiff, error)
Diff(context.Context, plumbing.ReferenceName, plumbing.ReferenceName) ([]EntrypointDiff, error)
DiffEntrypoint(context.Context, entrypoint.Entrypoint, string, string) ([]resource.ResourceDiff, []resource.Resource, []resource.Resource, error)
}
type DifferOption ¶
type DifferOption func(*repoDiffer)
DifferOption is a functional option for configuring a Differ.
func WithOtelTracer ¶
func WithOtelTracer(tracer trace.Tracer) DifferOption
WithOtelTracer configures the Differ to use the provided OpenTelemetry tracer for instrumentation.
func WithTracer ¶
func WithTracer(tracer *tracing.Tracer) DifferOption
WithTracer configures the Differ to use the provided tracer for instrumentation.
type EntrypointDiff ¶
type EntrypointDiff struct {
Entrypoint entrypoint.Entrypoint `json:"entrypoint"`
Error error `json:"error"`
Diff []resource.ResourceDiff `json:"diff"`
All []resource.Resource `json:"all"`
}
Click to show internal directories.
Click to hide internal directories.