Documentation
¶
Index ¶
- type BlameConfigProcessor
- type BlameConfigProcessorParams
- type BlameConfigTask
- type Collector
- type ExplicitDeleteProcessor
- type ExplicitDeleteProcessorStat
- type ExplicitDeleteProcessorStatCollection
- type ExplicitDeleteTaskParams
- type ImportConfigProcessor
- type MarkOwnerDeleteProcessor
- type OwnerDeleteMarkerProcessorParams
- type RemoveDeletedProcessor
- type RemoveDeletedProcessorParams
- type ResetFlagsProcessor
- type ResetFlagsProcessorParams
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 ¶
func (p *BlameConfigProcessor) Run(ctx context.Context, e api.Entry, poolFactory pool.VirtualPoolFactory) (*sdcpb.BlameTreeElement, error)
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 NewBlameConfigTask ¶
func NewBlameConfigTask(e api.Entry, c *BlameConfigProcessorParams) *BlameConfigTask
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 ¶
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.
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 ¶
func (p *ExplicitDeleteProcessor) Run(ctx context.Context, e api.Entry, poolFactory pool.VirtualPoolFactory) error
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 (e ExplicitDeleteProcessorStatCollection) Count() int
func (ExplicitDeleteProcessorStatCollection) Stats ¶
func (e ExplicitDeleteProcessorStatCollection) Stats() map[string]int
type ExplicitDeleteTaskParams ¶
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 ¶
func (p *ImportConfigProcessor) Run(ctx context.Context, e api.Entry, poolFactory pool.VirtualPoolFactory) error
type MarkOwnerDeleteProcessor ¶
type MarkOwnerDeleteProcessor struct {
// contains filtered or unexported fields
}
func NewOwnerDeleteMarker ¶
func NewOwnerDeleteMarker(params *OwnerDeleteMarkerProcessorParams) *MarkOwnerDeleteProcessor
func (*MarkOwnerDeleteProcessor) Run ¶
func (p *MarkOwnerDeleteProcessor) Run(e api.Entry, poolFactory pool.VirtualPoolFactory) error
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 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 NewRemoveDeletedProcessor ¶
func NewRemoveDeletedProcessor(params *RemoveDeletedProcessorParams) *RemoveDeletedProcessor
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 ¶
func (p *RemoveDeletedProcessor) Run(e api.Entry, poolFactory pool.VirtualPoolFactory) error
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 (r *ResetFlagsProcessorParams) SetDeleteFlag() *ResetFlagsProcessorParams
func (*ResetFlagsProcessorParams) SetNewFlag ¶
func (r *ResetFlagsProcessorParams) SetNewFlag() *ResetFlagsProcessorParams
func (*ResetFlagsProcessorParams) SetUpdateFlag ¶
func (r *ResetFlagsProcessorParams) SetUpdateFlag() *ResetFlagsProcessorParams