{"modulePath":"github.com/emnify/vpp-agent","version":"v1.4.1","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cache\n\nPackage 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.\n\n## Types\n\n```go\ntype PolicyCache struct {\n\t// contains filtered or unexported fields\n}\n```\nPolicyCache is cache for remembering policies and it can be used to handle different cases involving previously already created/delete policies.\n\n```go\nfunc NewPolicyCache(logger logging.Logger) *PolicyCache\n```\nNewPolicyCache creates instance of PolicyCache\n\n```go\nfunc (cache *PolicyCache) Delete(bsid srv6.SID) (policy *srv6.Policy, exists bool)\n```\nDelete removes policy identified by its binding SID \\\u003cbsid\u003e from cache\n\n```go\nfunc (cache *PolicyCache) GetValue(bsid srv6.SID) (policy *srv6.Policy, exists bool)\n```\nGetValue retries policy identified by its binding SID \\\u003cbsid\u003e from cache\n\n```go\nfunc (cache *PolicyCache) Put(bsid srv6.SID, policy *srv6.Policy)\n```\nPut adds new policy \\\u003cpolicy\u003e identified by its binding SID \\\u003cbsid\u003e into cache\n\n```go\ntype PolicySegmentCache struct {\n\t// contains filtered or unexported fields\n}\n```\nPolicySegmentCache is cache for remembering policy segments and it can be used to handle different cases involving previously already created/delete policies segments.\n\n```go\nfunc NewPolicySegmentCache(logger logging.Logger) *PolicySegmentCache\n```\nNewPolicySegmentCache creates instance of PolicySegmentCache\n\n```go\nfunc (cache *PolicySegmentCache) Delete(policyBSID srv6.SID, segmentName string) (segment *srv6.PolicySegment, exists bool)\n```\nDelete removes from cache policy segment identified by its name \\\u003csegmentName\u003e and belonging to policy with binding sid \\\u003cbsid\u003e\n\n```go\nfunc (cache *PolicySegmentCache) LookupByPolicy(bsid srv6.SID) ([]*srv6.PolicySegment, []string)\n```\nLookupByPolicy lookups in cache all policy segments belonging to policy with binding sid \\\u003cbsid\u003e\n\n```go\nfunc (cache *PolicySegmentCache) Put(policyBSID srv6.SID, segmentName string, policySegment *srv6.PolicySegment)\n```\nPut adds into cache new policy segment \\\u003cpolicySegment\u003e identified by its name \\\u003csegmentName\u003e and belonging to policy with binding sid \\\u003cbsid\u003e\n\n```go\ntype SteeringCache struct {\n\t// contains filtered or unexported fields\n}\n```\nSteeringCache is cache for remembering steerings and it can be used to handle different cases involving previously already created/delete steerings.\n\n```go\nfunc NewSteeringCache(logger logging.Logger) *SteeringCache\n```\nNewSteeringCache creates instance of SteeringCache\n\n```go\nfunc (cache *SteeringCache) Delete(name string) (steering *srv6.Steering, exists bool)\n```\nDelete removes from cache steering identified by its name \\\u003cname\u003e\n\n```go\nfunc (cache *SteeringCache) GetValue(name string) (steering *srv6.Steering, exists bool)\n```\nGetValue retrieves from cache steering identified by its name \\\u003cname\u003e\n\n```go\nfunc (cache *SteeringCache) LookupByPolicyBSID(bsid srv6.SID) ([]*srv6.Steering, []string)\n```\nLookupByPolicyBSID lookups in cache all steerings belonging to policy with binding sid \\\u003cbsid\u003e\n\n```go\nfunc (cache *SteeringCache) LookupByPolicyIndex(index uint32) ([]*srv6.Steering, []string)\n```\nLookupByPolicyIndex lookups in cache all steerings belonging to policy with internal VPP index \\\u003cindex\u003e\n\n```go\nfunc (cache *SteeringCache) Put(name string, steering *srv6.Steering)\n```\nPut adds into cache new steering \\\u003csteering\u003e identified by its name \\\u003cname\u003e\n\n","path":"github.com/emnify/vpp-agent/plugins/defaultplugins/srplugin/cache","name":"cache","synopsis":"Package cache contains caches for certain modeled types.","isRedistributable":true}
