Documentation ¶
Index ¶
- func GnmiPath2XPath(path *gnmi.Path, keys bool) string
- type Entry
- func (e *Entry) GetChildren() map[string]*Entry
- func (e *Entry) GetHierarchicalResourcesLocal(root bool, p *gnmi.Path, cp *gnmi.Path, hierPaths []*gnmi.Path) []*gnmi.Path
- func (e *Entry) GetHierarchicalResourcesRemote(p *gnmi.Path, cp *gnmi.Path, hierPaths []*gnmi.Path) []*gnmi.Path
- func (e *Entry) GetKey() []string
- func (e *Entry) GetKeys(p *gnmi.Path) []string
- func (e *Entry) GetLeafRef() []*leafref.LeafRef
- func (e *Entry) GetLeafRefsLocal(root bool, p *gnmi.Path, cp *gnmi.Path, leafRefs []*leafref.LeafRef) []*leafref.LeafRef
- func (e *Entry) GetName() string
- func (e *Entry) GetParent() *Entry
- func (e *Entry) GetParentDependency(p, rp *gnmi.Path, lastBoundaryPathElem string) *gnmi.Path
- func (e *Entry) GetResourceBoundary() bool
- func (e *Entry) IsPathPresent(p *gnmi.Path, rp *gnmi.Path, value string, x1 interface{}) bool
- func (e *Entry) Register(p *gnmi.Path)
- func (e *Entry) ResolveLocalLeafRefs(p *gnmi.Path, lrp *gnmi.Path, x1 interface{}, resolution *leafref.Resolution, ...)
- func (e *Entry) WithLogging(log logging.Logger)
- type EntryInitFunc
- type EntryOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entry ¶
type Entry struct { Log logging.Logger Name string Key []string Parent *Entry Children map[string]*Entry ResourceBoundary bool LeafRefs []*leafref.LeafRef Resources []*gnmi.Path }
func (*Entry) GetChildren ¶
func (*Entry) GetHierarchicalResourcesLocal ¶ added in v0.1.263
func (e *Entry) GetHierarchicalResourcesLocal(root bool, p *gnmi.Path, cp *gnmi.Path, hierPaths []*gnmi.Path) []*gnmi.Path
GetHierarchicalResourcesLocal returns the hierarchical paths of a resource 0. root is to know the first resource that is actually the root of the path 1. p is the path of the root resource 2. cp is the current path that extends to find the hierarchical resources once p is found 3. hierPaths contains the hierarchical resources
func (*Entry) GetHierarchicalResourcesRemote ¶ added in v0.1.263
func (e *Entry) GetHierarchicalResourcesRemote(p *gnmi.Path, cp *gnmi.Path, hierPaths []*gnmi.Path) []*gnmi.Path
GetHierarchicalResourcesRemote returns the hierarchical paths of a resource 1. p is the path of the root resource 2. cp is the current path that extends to find the hierarchical resources once p is found 3. hierPaths contains the hierarchical resources
func (*Entry) GetLeafRef ¶ added in v0.1.258
func (*Entry) GetLeafRefsLocal ¶ added in v0.1.263
func (e *Entry) GetLeafRefsLocal(root bool, p *gnmi.Path, cp *gnmi.Path, leafRefs []*leafref.LeafRef) []*leafref.LeafRef
Returns all leafRefs for a given resource 1. p is the path of the root resource 2. cp is the current path that extends to find the hierarchical resources once p is found 3. leafRefs contains the leafRefs of the resource
func (*Entry) GetParentDependency ¶ added in v0.1.496
GetParentDependency returns the parent dependency path 1. p is used to walk the yang tree, it gets decremented along the way until it reach 0 pathElem 2. rp is original root path 3. lastBoundaryPathElem is the last boundary element found along the tree
func (*Entry) GetResourceBoundary ¶ added in v0.1.236
func (*Entry) IsPathPresent ¶ added in v0.1.275
func (*Entry) ResolveLocalLeafRefs ¶ added in v0.1.264
func (e *Entry) ResolveLocalLeafRefs(p *gnmi.Path, lrp *gnmi.Path, x1 interface{}, resolution *leafref.Resolution, lridx int)
ResolveLeafRefs is a runtime function that resolves the leafrefs it recursively walks to the data and validates if the local leafref and data match up if the resolution is successfull the function returns the resolved leafrefs
func (*Entry) WithLogging ¶ added in v0.1.264
type EntryInitFunc ¶ added in v0.1.264
type EntryInitFunc func(parent *Entry, opts ...EntryOption) *Entry
type Entry struct { Log logging.Logger Name string Key []string Parent Handler Children map[string]Handler ResourceBoundary bool LeafRefs []*leafref.LeafRef }
type HandlerOption func(Handler)
func WithLogging(log logging.Logger) HandlerOption { return func(o Handler) { o.WithLogging(log) } }
type Handler interface { WithLogging(log logging.Logger) GetName() string GetKey() []string GetKeys(p *gnmi.Path) []string GetResourceBoundary() bool GetHierarchicalResourcesRemote(p *gnmi.Path, cp *gnmi.Path, hierPaths []*gnmi.Path) []*gnmi.Path GetHierarchicalResourcesLocal(root bool, p *gnmi.Path, cp *gnmi.Path, hierPaths []*gnmi.Path) []*gnmi.Path GetLeafRefsLocal(root bool, p *gnmi.Path, cp *gnmi.Path, leafRefs []*leafref.LeafRef) []*leafref.LeafRef ResolveLocalLeafRefs(p *gnmi.Path, lrp *gnmi.Path, x interface{}, rlrs []*leafref.ResolvedLeafRef, lridx int) []*leafref.ResolvedLeafRef IsRemoteLeafRefPresent(p *gnmi.Path, rp *gnmi.Path, x interface{}) bool }
type HandleInitFunc func(parent Handler, opts ...HandlerOption) Handler
type EntryOption ¶ added in v0.1.264
type EntryOption func(*Entry)
func WithLogging ¶ added in v0.1.217
func WithLogging(log logging.Logger) EntryOption