cache

package
v1.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

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

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

func (*PolicyCache) Delete

func (cache *PolicyCache) Delete(bsid srv6.SID) (policy *srv6.Policy, exists bool)

Delete removes policy identified by its binding SID <bsid> from cache

func (*PolicyCache) GetValue

func (cache *PolicyCache) GetValue(bsid srv6.SID) (policy *srv6.Policy, exists bool)

GetValue retries policy identified by its binding SID <bsid> from cache

func (*PolicyCache) Put

func (cache *PolicyCache) Put(bsid srv6.SID, policy *srv6.Policy)

Put adds new policy <policy> identified by its binding SID <bsid> into cache

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

func (cache *SteeringCache) LookupByPolicyBSID(bsid srv6.SID) ([]*srv6.Steering, []string)

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>

func (*SteeringCache) Put

func (cache *SteeringCache) Put(name string, steering *srv6.Steering)

Put adds into cache new steering <steering> identified by its name <name>

Jump to

Keyboard shortcuts

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