processors

package
v0.0.68 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlameConfigProcessor

type BlameConfigProcessor struct {
	// contains filtered or unexported fields
}

func NewBlameConfigProcessor

func NewBlameConfigProcessor(params *BlameConfigProcessorParams) *BlameConfigProcessor

func (*BlameConfigProcessor) Run

Run processes the entry tree starting from e, building a blame tree showing which owner (intent) is responsible for each configuration value. The pool parameter should be VirtualFailFast to stop on first error. Returns the blame tree structure and any error encountered.

type BlameConfigProcessorParams

type BlameConfigProcessorParams struct {
	IncludeDefaults bool
}

type BlameConfigTask

type BlameConfigTask struct {
	// contains filtered or unexported fields
}

func (*BlameConfigTask) Run

func (t *BlameConfigTask) Run(ctx context.Context, submit func(pool.Task) error) error

type Collector

type Collector[T any] struct {
	// contains filtered or unexported fields
}

Collector is a concurrent-safe, append-only collector for values of type T.

func NewCollector

func NewCollector[T any](cap int) *Collector[T]

NewCollector creates a Collector with a preallocated capacity. Pass 0 if you don't want to preallocate.

func (*Collector[T]) Append

func (c *Collector[T]) Append(x T)

Append appends one element to the collector.

func (*Collector[T]) AppendAll

func (c *Collector[T]) AppendAll(xs []T)

AppendAll appends all elements from the provided slice. This is slightly more efficient than calling Append in a loop.

func (*Collector[T]) Len

func (c *Collector[T]) Len() int

Len returns the current number of elements.

type ExplicitDeleteProcessor

type ExplicitDeleteProcessor struct {
	// contains filtered or unexported fields
}

func NewExplicitDeleteProcessor

func NewExplicitDeleteProcessor(params *ExplicitDeleteTaskParams) *ExplicitDeleteProcessor

func (*ExplicitDeleteProcessor) GetCreatedExplicitDeleteLeafEntries

func (edp *ExplicitDeleteProcessor) GetCreatedExplicitDeleteLeafEntries() api.LeafVariantSlice

GetCreatedExplicitDeleteLeafEntries returns all the explicitDelete LeafVariants that where created.

func (*ExplicitDeleteProcessor) GetExplicitDeleteCreationCount

func (edp *ExplicitDeleteProcessor) GetExplicitDeleteCreationCount() int

GetExplicitDeleteCreationCount returns the amount of all the explicitDelete LeafVariants that where created.

func (*ExplicitDeleteProcessor) Run

type ExplicitDeleteProcessorStat

type ExplicitDeleteProcessorStat interface {
	GetCreatedExplicitDeleteLeafEntries() api.LeafVariantSlice
	GetExplicitDeleteCreationCount() int
}

Stats structs

type ExplicitDeleteProcessorStatCollection

type ExplicitDeleteProcessorStatCollection map[string]ExplicitDeleteProcessorStat

func (ExplicitDeleteProcessorStatCollection) ContainsEntries

func (e ExplicitDeleteProcessorStatCollection) ContainsEntries() bool

func (ExplicitDeleteProcessorStatCollection) Count

func (ExplicitDeleteProcessorStatCollection) Stats

type ExplicitDeleteTaskParams

type ExplicitDeleteTaskParams struct {
	Owner    string
	Priority int32
}

ExplicitDeleteTaskParams contains the user-provided parameters for the explicit delete operation.

type ImportConfigProcessor

type ImportConfigProcessor struct {
	// contains filtered or unexported fields
}

func NewImportConfigProcessor

func NewImportConfigProcessor(importer treeimporter.ImportConfigAdapter, insertFlags *types.UpdateInsertFlags) *ImportConfigProcessor

func (*ImportConfigProcessor) GetStats

func (p *ImportConfigProcessor) GetStats() *types.ImportStats

func (*ImportConfigProcessor) Run

type MarkOwnerDeleteProcessor

type MarkOwnerDeleteProcessor struct {
	// contains filtered or unexported fields
}

func (*MarkOwnerDeleteProcessor) Run

Run processes the entry tree starting from e, marking leaf variant entries for deletion by the specified owner. The pool parameter should be VirtualFailFast to stop on first error. Returns the first error encountered, or nil if successful.

type OwnerDeleteMarkerProcessorParams

type OwnerDeleteMarkerProcessorParams struct {
	Owner        string
	OnlyIntended bool
}

type RemoveDeletedProcessor

type RemoveDeletedProcessor struct {
	// contains filtered or unexported fields
}

RemoveDeletedProcessor is responsible for removing leaf variant entries marked for deletion by the specified owner.

func (*RemoveDeletedProcessor) GetDeleteStatsCount

func (p *RemoveDeletedProcessor) GetDeleteStatsCount() int64

GetDeleteStatsCount returns the amount of leaf variant entries that were removed during the RemoveDeleted process.

func (*RemoveDeletedProcessor) GetZeroLengthLeafVariantEntries

func (p *RemoveDeletedProcessor) GetZeroLengthLeafVariantEntries() []api.Entry

GetZeroLengthLeafVariantEntries returns the entries that have zero-length leaf variant entries after removal

func (*RemoveDeletedProcessor) Run

Run processes the entry tree starting from e, removing leaf variant entries marked for deletion by the specified owner. The pool parameter should be VirtualFailFast to stop on first error. Returns the first error encountered, or nil if successful.

type RemoveDeletedProcessorParams

type RemoveDeletedProcessorParams struct {
	Owner string
}

RemoveDeletedProcessorParams contains the user-provided parameters for the remove deleted operation.

type ResetFlagsProcessor

type ResetFlagsProcessor struct {
	// contains filtered or unexported fields
}

ResetFlagsProcessor resets the flags on leaf variant entries

func NewResetFlagsProcessor

func NewResetFlagsProcessor(params *ResetFlagsProcessorParams) *ResetFlagsProcessor

func (*ResetFlagsProcessor) GetAdjustedFlagsCount

func (r *ResetFlagsProcessor) GetAdjustedFlagsCount() int64

GetAdjustedFlagsCount returns the number of flags that were adjusted

func (*ResetFlagsProcessor) Run

func (p *ResetFlagsProcessor) Run(e api.Entry, poolFactory pool.VirtualPoolFactory) error

Run processes the entry tree starting from e, resetting flags on all leaf variant entries according to the processor configuration. The pool parameter can be either VirtualFailFast (stops on first error) or VirtualTolerant (collects all errors). Returns the first error for fail-fast pools, or a combined error for tolerant pools.

type ResetFlagsProcessorParams

type ResetFlagsProcessorParams struct {
	DeleteFlag, NewFlag, UpdateFlag bool
}

func (*ResetFlagsProcessorParams) SetDeleteFlag

func (*ResetFlagsProcessorParams) SetNewFlag

func (*ResetFlagsProcessorParams) SetUpdateFlag

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL