Documentation
¶
Index ¶
- func NewEntry(ctx context.Context, parent api.Entry, pathElemName string, tc api.TreeContext) (api.Entry, error)
- func NewSharedEntryAttributes(ctx context.Context, parent api.Entry, pathElemName string, tc api.TreeContext) (*sharedEntryAttributes, error)
- type RootEntry
- func (r *RootEntry) AddUpdatesRecursive(ctx context.Context, us []*types.PathAndUpdate, flags *types.UpdateInsertFlags) error
- func (r *RootEntry) DeepCopy(ctx context.Context) (*RootEntry, error)
- func (r *RootEntry) DeleteBranchPaths(ctx context.Context, deletes types.DeleteEntriesList, intentName string) error
- func (r *RootEntry) FinishInsertionPhase(ctx context.Context) error
- func (r *RootEntry) GetAncestorSchema() (*sdcpb.SchemaElem, int)
- func (r *RootEntry) GetDeletes(aggregatePaths bool) (types.DeleteEntriesList, error)
- func (r *RootEntry) GetDeletesForOwner(owner string) sdcpb.Paths
- func (r *RootEntry) GetHighestPrecedence(onlyNewOrUpdated bool) api.LeafVariantSlice
- func (r *RootEntry) GetUpdatesForOwner(owner string) types.UpdateSlice
- func (r *RootEntry) ImportConfig(ctx context.Context, basePath *sdcpb.Path, ...) (*types.ImportStats, error)
- func (r *RootEntry) SetNonRevertiveIntent(intentName string, nonRevertive bool)
- func (r *RootEntry) String() string
- type TreeContext
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
Types ¶
type RootEntry ¶
RootEntry the root of the cache.Update tree
func NewTreeRoot ¶
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) 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 (*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 ¶
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
type TreeContext ¶
type TreeContext struct {
// contains filtered or unexported fields
}
func NewTreeContext ¶
func NewTreeContext(sc schemaClient.SchemaClientBound, poolFactory pool.VirtualPoolFactory) *TreeContext
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