tree

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: 17 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEntry added in v0.0.67

func NewEntry(ctx context.Context, parent api.Entry, pathElemName string, tc api.TreeContext) (api.Entry, error)

NewEntry constructor for Entries

func NewSharedEntryAttributes added in v0.0.68

func NewSharedEntryAttributes(ctx context.Context, parent api.Entry, pathElemName string, tc api.TreeContext) (*sharedEntryAttributes, error)

Types

type RootEntry

type RootEntry struct {
	api.Entry
}

RootEntry the root of the cache.Update tree

func NewTreeRoot

func NewTreeRoot(ctx context.Context, tc api.TreeContext) (*RootEntry, error)

NewTreeRoot Instantiate a new Tree Root element.

func (*RootEntry) AddUpdatesRecursive added in v0.0.56

func (r *RootEntry) AddUpdatesRecursive(ctx context.Context, us []*types.PathAndUpdate, flags *types.UpdateInsertFlags) error

func (*RootEntry) DeepCopy added in v0.0.54

func (r *RootEntry) DeepCopy(ctx context.Context) (*RootEntry, error)

func (*RootEntry) DeleteBranchPaths added in v0.0.62

func (r *RootEntry) DeleteBranchPaths(ctx context.Context, deletes types.DeleteEntriesList, intentName string) error

DeleteSubtree Deletes from the tree, all elements of the PathSlice defined branch of the given owner. Return values are remainsToExist and error if an error occured.

func (*RootEntry) FinishInsertionPhase

func (r *RootEntry) FinishInsertionPhase(ctx context.Context) error

func (*RootEntry) GetAncestorSchema

func (r *RootEntry) GetAncestorSchema() (*sdcpb.SchemaElem, int)

func (*RootEntry) GetDeletes

func (r *RootEntry) GetDeletes(aggregatePaths bool) (types.DeleteEntriesList, error)

GetDeletes returns the paths that due to the Tree content are to be deleted from the southbound device.

func (*RootEntry) GetDeletesForOwner

func (r *RootEntry) GetDeletesForOwner(owner string) sdcpb.Paths

GetDeletesForOwner returns the deletes that have been calculated for the given intent / owner

func (*RootEntry) GetHighestPrecedence

func (r *RootEntry) GetHighestPrecedence(onlyNewOrUpdated bool) api.LeafVariantSlice

GetHighesPrecedence return the new cache.Update entried from the tree that are the highes priority. If the onlyNewOrUpdated option is set to true, only the New or Updated entries will be returned It will append to the given list and provide a new pointer to the slice

func (*RootEntry) GetUpdatesForOwner

func (r *RootEntry) GetUpdatesForOwner(owner string) types.UpdateSlice

GetUpdatesForOwner returns the updates that have been calculated for the given intent / owner

func (*RootEntry) ImportConfig added in v0.0.44

func (r *RootEntry) ImportConfig(ctx context.Context, basePath *sdcpb.Path, importer importer.ImportConfigAdapter, flags *types.UpdateInsertFlags, poolFactory pool.VirtualPoolFactory) (*types.ImportStats, error)

func (*RootEntry) SetNonRevertiveIntent added in v0.0.67

func (r *RootEntry) SetNonRevertiveIntent(intentName string, nonRevertive bool)

func (*RootEntry) String

func (r *RootEntry) String() string

String returns the string representation of the Tree.

type TreeContext

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

func (*TreeContext) DeepCopy added in v0.0.68

func (t *TreeContext) DeepCopy() api.TreeContext

deepCopy root is required to be set manually

func (*TreeContext) ExplicitDeletes added in v0.0.68

func (t *TreeContext) ExplicitDeletes() *api.DeletePathSet

func (*TreeContext) NonRevertiveInfo added in v0.0.68

func (t *TreeContext) NonRevertiveInfo() api.NonRevertiveInfos

func (*TreeContext) PoolFactory added in v0.0.68

func (t *TreeContext) PoolFactory() pool.VirtualPoolFactory

func (*TreeContext) SchemaClient added in v0.0.68

func (t *TreeContext) SchemaClient() schemaClient.SchemaClientBound

Directories

Path Synopsis
api
xml
ops

Jump to

Keyboard shortcuts

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