Documentation ¶
Overview ¶
Package cache contains caches for certain modeled types. Purpose of caches is i.e. to enable delayed configuration as solution to bad ordered asynchronous configuration commands from etcd.
Index ¶
- type PolicyCache
- type PolicySegmentCache
- func (cache *PolicySegmentCache) Delete(policyBSID srv6.SID, segmentName string) (segment *srv6.PolicySegment, exists bool)
- func (cache *PolicySegmentCache) LookupByPolicy(bsid srv6.SID) ([]*srv6.PolicySegment, []string)
- func (cache *PolicySegmentCache) Put(policyBSID srv6.SID, segmentName string, policySegment *srv6.PolicySegment)
- type SteeringCache
- func (cache *SteeringCache) Delete(name string) (steering *srv6.Steering, exists bool)
- func (cache *SteeringCache) GetValue(name string) (steering *srv6.Steering, exists bool)
- func (cache *SteeringCache) LookupByPolicyBSID(bsid srv6.SID) ([]*srv6.Steering, []string)
- func (cache *SteeringCache) LookupByPolicyIndex(index uint32) ([]*srv6.Steering, []string)
- func (cache *SteeringCache) Put(name string, steering *srv6.Steering)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PolicyCache ¶
type PolicyCache struct {
// contains filtered or unexported fields
}
PolicyCache is cache for remembering policies and it can be used to handle different cases involving previously already created/delete policies.
func NewPolicyCache ¶
func NewPolicyCache(logger logging.Logger) *PolicyCache
NewPolicyCache creates instance of PolicyCache
type PolicySegmentCache ¶
type PolicySegmentCache struct {
// contains filtered or unexported fields
}
PolicySegmentCache is cache for remembering policy segments and it can be used to handle different cases involving previously already created/delete policies segments.
func NewPolicySegmentCache ¶
func NewPolicySegmentCache(logger logging.Logger) *PolicySegmentCache
NewPolicySegmentCache creates instance of PolicySegmentCache
func (*PolicySegmentCache) Delete ¶
func (cache *PolicySegmentCache) Delete(policyBSID srv6.SID, segmentName string) (segment *srv6.PolicySegment, exists bool)
Delete removes from cache policy segment identified by its name <segmentName> and belonging to policy with binding sid <bsid>
func (*PolicySegmentCache) LookupByPolicy ¶
func (cache *PolicySegmentCache) LookupByPolicy(bsid srv6.SID) ([]*srv6.PolicySegment, []string)
LookupByPolicy lookups in cache all policy segments belonging to policy with binding sid <bsid>
func (*PolicySegmentCache) Put ¶
func (cache *PolicySegmentCache) Put(policyBSID srv6.SID, segmentName string, policySegment *srv6.PolicySegment)
Put adds into cache new policy segment <policySegment> identified by its name <segmentName> and belonging to policy with binding sid <bsid>
type SteeringCache ¶
type SteeringCache struct {
// contains filtered or unexported fields
}
SteeringCache is cache for remembering steerings and it can be used to handle different cases involving previously already created/delete steerings.
func NewSteeringCache ¶
func NewSteeringCache(logger logging.Logger) *SteeringCache
NewSteeringCache creates instance of SteeringCache
func (*SteeringCache) Delete ¶
func (cache *SteeringCache) Delete(name string) (steering *srv6.Steering, exists bool)
Delete removes from cache steering identified by its name <name>
func (*SteeringCache) GetValue ¶
func (cache *SteeringCache) GetValue(name string) (steering *srv6.Steering, exists bool)
GetValue retrieves from cache steering identified by its name <name>
func (*SteeringCache) LookupByPolicyBSID ¶
LookupByPolicyBSID lookups in cache all steerings belonging to policy with binding sid <bsid>
func (*SteeringCache) LookupByPolicyIndex ¶
func (cache *SteeringCache) LookupByPolicyIndex(index uint32) ([]*srv6.Steering, []string)
LookupByPolicyIndex lookups in cache all steerings belonging to policy with internal VPP index <index>