id int32 0 167k | repo stringlengths 5 54 | path stringlengths 4 155 | func_name stringlengths 1 118 | original_string stringlengths 52 85.5k | language stringclasses 1
value | code stringlengths 52 85.5k | code_tokens listlengths 21 1.41k | docstring stringlengths 6 2.61k | docstring_tokens listlengths 3 215 | sha stringlengths 40 40 | url stringlengths 85 252 |
|---|---|---|---|---|---|---|---|---|---|---|---|
163,800 | cilium/cilium | pkg/identity/identity.go | RequiresGlobalIdentity | func RequiresGlobalIdentity(lbls labels.Labels) bool {
for _, label := range lbls {
switch label.Source {
case labels.LabelSourceCIDR, labels.LabelSourceReserved:
default:
return true
}
}
return false
} | go | func RequiresGlobalIdentity(lbls labels.Labels) bool {
for _, label := range lbls {
switch label.Source {
case labels.LabelSourceCIDR, labels.LabelSourceReserved:
default:
return true
}
}
return false
} | [
"func",
"RequiresGlobalIdentity",
"(",
"lbls",
"labels",
".",
"Labels",
")",
"bool",
"{",
"for",
"_",
",",
"label",
":=",
"range",
"lbls",
"{",
"switch",
"label",
".",
"Source",
"{",
"case",
"labels",
".",
"LabelSourceCIDR",
",",
"labels",
".",
"LabelSourc... | // RequiresGlobalIdentity returns true if the label combination requires a
// global identity | [
"RequiresGlobalIdentity",
"returns",
"true",
"if",
"the",
"label",
"combination",
"requires",
"a",
"global",
"identity"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/identity/identity.go#L197-L207 |
163,801 | cilium/cilium | daemon/fqdn.go | extractDNSLookups | func extractDNSLookups(endpoints []*endpoint.Endpoint, CIDRStr, matchPatternStr string) (lookups []*models.DNSLookup, err error) {
cidrMatcher := func(ip net.IP) bool { return true }
if CIDRStr != "" {
_, cidr, err := net.ParseCIDR(CIDRStr)
if err != nil {
return nil, err
}
cidrMatcher = func(ip net.IP) bo... | go | func extractDNSLookups(endpoints []*endpoint.Endpoint, CIDRStr, matchPatternStr string) (lookups []*models.DNSLookup, err error) {
cidrMatcher := func(ip net.IP) bool { return true }
if CIDRStr != "" {
_, cidr, err := net.ParseCIDR(CIDRStr)
if err != nil {
return nil, err
}
cidrMatcher = func(ip net.IP) bo... | [
"func",
"extractDNSLookups",
"(",
"endpoints",
"[",
"]",
"*",
"endpoint",
".",
"Endpoint",
",",
"CIDRStr",
",",
"matchPatternStr",
"string",
")",
"(",
"lookups",
"[",
"]",
"*",
"models",
".",
"DNSLookup",
",",
"err",
"error",
")",
"{",
"cidrMatcher",
":=",... | // extractDNSLookups returns API models.DNSLookup copies of DNS data in each
// endpoint's DNSHistory. These are filtered by CIDRStr and matchPatternStr if
// they are non-empty. | [
"extractDNSLookups",
"returns",
"API",
"models",
".",
"DNSLookup",
"copies",
"of",
"DNS",
"data",
"in",
"each",
"endpoint",
"s",
"DNSHistory",
".",
"These",
"are",
"filtered",
"by",
"CIDRStr",
"and",
"matchPatternStr",
"if",
"they",
"are",
"non",
"-",
"empty",... | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/daemon/fqdn.go#L509-L559 |
163,802 | cilium/cilium | daemon/fqdn.go | readPreCache | func readPreCache(preCachePath string) (cache *fqdn.DNSCache, err error) {
data, err := ioutil.ReadFile(preCachePath)
if err != nil {
return nil, err
}
cache = fqdn.NewDNSCache(0) // no per-host limit here
if err = cache.UnmarshalJSON(data); err != nil {
return nil, err
}
return cache, nil
} | go | func readPreCache(preCachePath string) (cache *fqdn.DNSCache, err error) {
data, err := ioutil.ReadFile(preCachePath)
if err != nil {
return nil, err
}
cache = fqdn.NewDNSCache(0) // no per-host limit here
if err = cache.UnmarshalJSON(data); err != nil {
return nil, err
}
return cache, nil
} | [
"func",
"readPreCache",
"(",
"preCachePath",
"string",
")",
"(",
"cache",
"*",
"fqdn",
".",
"DNSCache",
",",
"err",
"error",
")",
"{",
"data",
",",
"err",
":=",
"ioutil",
".",
"ReadFile",
"(",
"preCachePath",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
... | // readPreCache returns a fqdn.DNSCache object created from the json data at
// preCachePath | [
"readPreCache",
"returns",
"a",
"fqdn",
".",
"DNSCache",
"object",
"created",
"from",
"the",
"json",
"data",
"at",
"preCachePath"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/daemon/fqdn.go#L587-L598 |
163,803 | cilium/cilium | pkg/policy/groups/aws/aws.go | GetIPsFromGroup | func GetIPsFromGroup(group *api.ToGroups) ([]net.IP, error) {
result := []net.IP{}
if group.AWS == nil {
return result, fmt.Errorf("no aws data available")
}
return getInstancesIpsFromFilter(group.AWS)
} | go | func GetIPsFromGroup(group *api.ToGroups) ([]net.IP, error) {
result := []net.IP{}
if group.AWS == nil {
return result, fmt.Errorf("no aws data available")
}
return getInstancesIpsFromFilter(group.AWS)
} | [
"func",
"GetIPsFromGroup",
"(",
"group",
"*",
"api",
".",
"ToGroups",
")",
"(",
"[",
"]",
"net",
".",
"IP",
",",
"error",
")",
"{",
"result",
":=",
"[",
"]",
"net",
".",
"IP",
"{",
"}",
"\n",
"if",
"group",
".",
"AWS",
"==",
"nil",
"{",
"return... | // GetIPsFromGroup will return the list of the ips for the given group filter | [
"GetIPsFromGroup",
"will",
"return",
"the",
"list",
"of",
"the",
"ips",
"for",
"the",
"given",
"group",
"filter"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/policy/groups/aws/aws.go#L44-L50 |
163,804 | cilium/cilium | pkg/policy/groups/aws/aws.go | initializeAWSAccount | func initializeAWSAccount(region string) (*aws.Config, error) {
cfg, err := external.LoadDefaultAWSConfig()
if err != nil {
return nil, fmt.Errorf("Cannot initialize aws connector: %s", err)
}
cfg.Region = region
cfg.LogLevel = awsLogLevel
return &cfg, nil
} | go | func initializeAWSAccount(region string) (*aws.Config, error) {
cfg, err := external.LoadDefaultAWSConfig()
if err != nil {
return nil, fmt.Errorf("Cannot initialize aws connector: %s", err)
}
cfg.Region = region
cfg.LogLevel = awsLogLevel
return &cfg, nil
} | [
"func",
"initializeAWSAccount",
"(",
"region",
"string",
")",
"(",
"*",
"aws",
".",
"Config",
",",
"error",
")",
"{",
"cfg",
",",
"err",
":=",
"external",
".",
"LoadDefaultAWSConfig",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",... | // initializeAWSAccount retrieve the env variables from the runtime and it
// iniliazes the account in the specified region. | [
"initializeAWSAccount",
"retrieve",
"the",
"env",
"variables",
"from",
"the",
"runtime",
"and",
"it",
"iniliazes",
"the",
"account",
"in",
"the",
"specified",
"region",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/policy/groups/aws/aws.go#L54-L62 |
163,805 | cilium/cilium | pkg/policy/groups/aws/aws.go | getInstancesIpsFromFilter | func getInstancesIpsFromFilter(filter *api.AWSGroup) ([]net.IP, error) {
region := filter.Region
if filter.Region == "" {
region = getDefaultRegion()
}
input := &ec2.DescribeInstancesInput{}
for labelKey, labelValue := range filter.Labels {
newFilter := ec2.Filter{
Name: aws.String(fmt.Sprintf("%s:%s", po... | go | func getInstancesIpsFromFilter(filter *api.AWSGroup) ([]net.IP, error) {
region := filter.Region
if filter.Region == "" {
region = getDefaultRegion()
}
input := &ec2.DescribeInstancesInput{}
for labelKey, labelValue := range filter.Labels {
newFilter := ec2.Filter{
Name: aws.String(fmt.Sprintf("%s:%s", po... | [
"func",
"getInstancesIpsFromFilter",
"(",
"filter",
"*",
"api",
".",
"AWSGroup",
")",
"(",
"[",
"]",
"net",
".",
"IP",
",",
"error",
")",
"{",
"region",
":=",
"filter",
".",
"Region",
"\n",
"if",
"filter",
".",
"Region",
"==",
"\"",
"\"",
"{",
"regio... | // getInstancesFromFilter returns the instances IPs in aws EC2 filter by the
// given filter | [
"getInstancesFromFilter",
"returns",
"the",
"instances",
"IPs",
"in",
"aws",
"EC2",
"filter",
"by",
"the",
"given",
"filter"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/policy/groups/aws/aws.go#L66-L104 |
163,806 | cilium/cilium | pkg/kvstore/store/store.go | validate | func (c *Configuration) validate() error {
if c.Prefix == "" {
return fmt.Errorf("prefix must be specified")
}
if c.KeyCreator == nil {
return fmt.Errorf("KeyCreator must be specified")
}
if c.SynchronizationInterval == 0 {
c.SynchronizationInterval = option.Config.KVstorePeriodicSync
}
if c.Backend == ... | go | func (c *Configuration) validate() error {
if c.Prefix == "" {
return fmt.Errorf("prefix must be specified")
}
if c.KeyCreator == nil {
return fmt.Errorf("KeyCreator must be specified")
}
if c.SynchronizationInterval == 0 {
c.SynchronizationInterval = option.Config.KVstorePeriodicSync
}
if c.Backend == ... | [
"func",
"(",
"c",
"*",
"Configuration",
")",
"validate",
"(",
")",
"error",
"{",
"if",
"c",
".",
"Prefix",
"==",
"\"",
"\"",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n\n",
"if",
"c",
".",
"KeyCreator",
"==",
"nil",
... | // validate is invoked by JoinSharedStore to validate and complete the
// configuration. It returns nil when the configuration is valid. | [
"validate",
"is",
"invoked",
"by",
"JoinSharedStore",
"to",
"validate",
"and",
"complete",
"the",
"configuration",
".",
"It",
"returns",
"nil",
"when",
"the",
"configuration",
"is",
"valid",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/kvstore/store/store.go#L81-L99 |
163,807 | cilium/cilium | pkg/kvstore/store/store.go | JoinSharedStore | func JoinSharedStore(c Configuration) (*SharedStore, error) {
if err := c.validate(); err != nil {
return nil, err
}
s := &SharedStore{
conf: c,
localKeys: map[string]LocalKey{},
sharedKeys: map[string]Key{},
backend: c.Backend,
}
s.name = "store-" + s.conf.Prefix
s.controllerName = "kvstore... | go | func JoinSharedStore(c Configuration) (*SharedStore, error) {
if err := c.validate(); err != nil {
return nil, err
}
s := &SharedStore{
conf: c,
localKeys: map[string]LocalKey{},
sharedKeys: map[string]Key{},
backend: c.Backend,
}
s.name = "store-" + s.conf.Prefix
s.controllerName = "kvstore... | [
"func",
"JoinSharedStore",
"(",
"c",
"Configuration",
")",
"(",
"*",
"SharedStore",
",",
"error",
")",
"{",
"if",
"err",
":=",
"c",
".",
"validate",
"(",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\n",
"}",
"\n\n",
"s",
":=",
... | // JoinSharedStore creates a new shared store based on the provided
// configuration. An error is returned if the configuration is invalid. The
// store is initialized with the contents of the kvstore. An error is returned
// if the contents cannot be retrieved synchronously from the kvstore. Starts a
// controller to ... | [
"JoinSharedStore",
"creates",
"a",
"new",
"shared",
"store",
"based",
"on",
"the",
"provided",
"configuration",
".",
"An",
"error",
"is",
"returned",
"if",
"the",
"configuration",
"is",
"invalid",
".",
"The",
"store",
"is",
"initialized",
"with",
"the",
"conte... | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/kvstore/store/store.go#L190-L219 |
163,808 | cilium/cilium | pkg/kvstore/store/store.go | keyPath | func (s *SharedStore) keyPath(key NamedKey) string {
// WARNING - STABLE API: The composition of the absolute key path
// cannot be changed without breaking up and downgrades.
return path.Join(s.conf.Prefix, key.GetKeyName())
} | go | func (s *SharedStore) keyPath(key NamedKey) string {
// WARNING - STABLE API: The composition of the absolute key path
// cannot be changed without breaking up and downgrades.
return path.Join(s.conf.Prefix, key.GetKeyName())
} | [
"func",
"(",
"s",
"*",
"SharedStore",
")",
"keyPath",
"(",
"key",
"NamedKey",
")",
"string",
"{",
"// WARNING - STABLE API: The composition of the absolute key path",
"// cannot be changed without breaking up and downgrades.",
"return",
"path",
".",
"Join",
"(",
"s",
".",
... | // keyPath returns the absolute kvstore path of a key | [
"keyPath",
"returns",
"the",
"absolute",
"kvstore",
"path",
"of",
"a",
"key"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/kvstore/store/store.go#L258-L262 |
163,809 | cilium/cilium | pkg/kvstore/store/store.go | syncLocalKey | func (s *SharedStore) syncLocalKey(key LocalKey) error {
jsonValue, err := key.Marshal()
if err != nil {
return err
}
// Update key in kvstore, overwrite an eventual existing key, attach
// lease to expire entry when agent dies and never comes back up.
if _, err := s.backend.UpdateIfDifferent(context.TODO(), s... | go | func (s *SharedStore) syncLocalKey(key LocalKey) error {
jsonValue, err := key.Marshal()
if err != nil {
return err
}
// Update key in kvstore, overwrite an eventual existing key, attach
// lease to expire entry when agent dies and never comes back up.
if _, err := s.backend.UpdateIfDifferent(context.TODO(), s... | [
"func",
"(",
"s",
"*",
"SharedStore",
")",
"syncLocalKey",
"(",
"key",
"LocalKey",
")",
"error",
"{",
"jsonValue",
",",
"err",
":=",
"key",
".",
"Marshal",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n",
"// Update ... | // syncLocalKey synchronizes a key to the kvstore | [
"syncLocalKey",
"synchronizes",
"a",
"key",
"to",
"the",
"kvstore"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/kvstore/store/store.go#L265-L278 |
163,810 | cilium/cilium | pkg/kvstore/store/store.go | syncLocalKeys | func (s *SharedStore) syncLocalKeys() error {
// Create a copy of all local keys so we can unlock and sync to kvstore
// without holding the lock
s.mutex.RLock()
keys := []LocalKey{}
for _, key := range s.localKeys {
keys = append(keys, key)
}
s.mutex.RUnlock()
for _, key := range keys {
if err := s.syncLo... | go | func (s *SharedStore) syncLocalKeys() error {
// Create a copy of all local keys so we can unlock and sync to kvstore
// without holding the lock
s.mutex.RLock()
keys := []LocalKey{}
for _, key := range s.localKeys {
keys = append(keys, key)
}
s.mutex.RUnlock()
for _, key := range keys {
if err := s.syncLo... | [
"func",
"(",
"s",
"*",
"SharedStore",
")",
"syncLocalKeys",
"(",
")",
"error",
"{",
"// Create a copy of all local keys so we can unlock and sync to kvstore",
"// without holding the lock",
"s",
".",
"mutex",
".",
"RLock",
"(",
")",
"\n",
"keys",
":=",
"[",
"]",
"Lo... | // syncLocalKeys synchronizes all local keys with the kvstore | [
"syncLocalKeys",
"synchronizes",
"all",
"local",
"keys",
"with",
"the",
"kvstore"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/kvstore/store/store.go#L281-L298 |
163,811 | cilium/cilium | pkg/kvstore/store/store.go | SharedKeysMap | func (s *SharedStore) SharedKeysMap() map[string]Key {
s.mutex.RLock()
defer s.mutex.RUnlock()
sharedKeysCopy := make(map[string]Key, len(s.sharedKeys))
for k, v := range s.sharedKeys {
sharedKeysCopy[k] = v
}
return sharedKeysCopy
} | go | func (s *SharedStore) SharedKeysMap() map[string]Key {
s.mutex.RLock()
defer s.mutex.RUnlock()
sharedKeysCopy := make(map[string]Key, len(s.sharedKeys))
for k, v := range s.sharedKeys {
sharedKeysCopy[k] = v
}
return sharedKeysCopy
} | [
"func",
"(",
"s",
"*",
"SharedStore",
")",
"SharedKeysMap",
"(",
")",
"map",
"[",
"string",
"]",
"Key",
"{",
"s",
".",
"mutex",
".",
"RLock",
"(",
")",
"\n",
"defer",
"s",
".",
"mutex",
".",
"RUnlock",
"(",
")",
"\n",
"sharedKeysCopy",
":=",
"make"... | // SharedKeysMap returns a copy of the SharedKeysMap, the returned map can
// be safely modified but the values of the map represent the actual data
// stored in the internal SharedStore SharedKeys map. | [
"SharedKeysMap",
"returns",
"a",
"copy",
"of",
"the",
"SharedKeysMap",
"the",
"returned",
"map",
"can",
"be",
"safely",
"modified",
"but",
"the",
"values",
"of",
"the",
"map",
"represent",
"the",
"actual",
"data",
"stored",
"in",
"the",
"internal",
"SharedStor... | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/kvstore/store/store.go#L316-L325 |
163,812 | cilium/cilium | pkg/kvstore/store/store.go | UpdateLocalKey | func (s *SharedStore) UpdateLocalKey(key LocalKey) {
s.mutex.Lock()
s.localKeys[key.GetKeyName()] = key.DeepKeyCopy()
s.mutex.Unlock()
} | go | func (s *SharedStore) UpdateLocalKey(key LocalKey) {
s.mutex.Lock()
s.localKeys[key.GetKeyName()] = key.DeepKeyCopy()
s.mutex.Unlock()
} | [
"func",
"(",
"s",
"*",
"SharedStore",
")",
"UpdateLocalKey",
"(",
"key",
"LocalKey",
")",
"{",
"s",
".",
"mutex",
".",
"Lock",
"(",
")",
"\n",
"s",
".",
"localKeys",
"[",
"key",
".",
"GetKeyName",
"(",
")",
"]",
"=",
"key",
".",
"DeepKeyCopy",
"(",... | // UpdateLocalKey adds a key to be synchronized with the kvstore | [
"UpdateLocalKey",
"adds",
"a",
"key",
"to",
"be",
"synchronized",
"with",
"the",
"kvstore"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/kvstore/store/store.go#L328-L332 |
163,813 | cilium/cilium | pkg/kvstore/store/store.go | UpdateLocalKeySync | func (s *SharedStore) UpdateLocalKeySync(key LocalKey) error {
s.UpdateLocalKey(key)
if err := s.syncLocalKey(key); err != nil {
s.DeleteLocalKey(key)
return err
}
return nil
} | go | func (s *SharedStore) UpdateLocalKeySync(key LocalKey) error {
s.UpdateLocalKey(key)
if err := s.syncLocalKey(key); err != nil {
s.DeleteLocalKey(key)
return err
}
return nil
} | [
"func",
"(",
"s",
"*",
"SharedStore",
")",
"UpdateLocalKeySync",
"(",
"key",
"LocalKey",
")",
"error",
"{",
"s",
".",
"UpdateLocalKey",
"(",
"key",
")",
"\n\n",
"if",
"err",
":=",
"s",
".",
"syncLocalKey",
"(",
"key",
")",
";",
"err",
"!=",
"nil",
"{... | // UpdateLocalKeySync synchronously synchronizes a local key with the kvstore
// and adds it to the list of local keys to be synchronized if the initial
// synchronous synchronization was successful | [
"UpdateLocalKeySync",
"synchronously",
"synchronizes",
"a",
"local",
"key",
"with",
"the",
"kvstore",
"and",
"adds",
"it",
"to",
"the",
"list",
"of",
"local",
"keys",
"to",
"be",
"synchronized",
"if",
"the",
"initial",
"synchronous",
"synchronization",
"was",
"s... | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/kvstore/store/store.go#L337-L346 |
163,814 | cilium/cilium | pkg/kvstore/store/store.go | UpdateKeySync | func (s *SharedStore) UpdateKeySync(key LocalKey) error {
err := s.syncLocalKey(key)
if err != nil {
s.DeleteLocalKey(key)
return err
}
return err
} | go | func (s *SharedStore) UpdateKeySync(key LocalKey) error {
err := s.syncLocalKey(key)
if err != nil {
s.DeleteLocalKey(key)
return err
}
return err
} | [
"func",
"(",
"s",
"*",
"SharedStore",
")",
"UpdateKeySync",
"(",
"key",
"LocalKey",
")",
"error",
"{",
"err",
":=",
"s",
".",
"syncLocalKey",
"(",
"key",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"s",
".",
"DeleteLocalKey",
"(",
"key",
")",
"\n",
"... | // UpdateKeySync synchronously synchronizes a key with the kvstore. | [
"UpdateKeySync",
"synchronously",
"synchronizes",
"a",
"key",
"with",
"the",
"kvstore",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/kvstore/store/store.go#L349-L357 |
163,815 | cilium/cilium | pkg/kvstore/store/store.go | DeleteLocalKey | func (s *SharedStore) DeleteLocalKey(key NamedKey) {
name := key.GetKeyName()
s.mutex.Lock()
_, ok := s.localKeys[name]
delete(s.localKeys, name)
s.mutex.Unlock()
err := s.backend.Delete(s.keyPath(key))
if ok {
if err != nil {
s.getLogger().WithError(err).Warning("Unable to delete key in kvstore")
}
... | go | func (s *SharedStore) DeleteLocalKey(key NamedKey) {
name := key.GetKeyName()
s.mutex.Lock()
_, ok := s.localKeys[name]
delete(s.localKeys, name)
s.mutex.Unlock()
err := s.backend.Delete(s.keyPath(key))
if ok {
if err != nil {
s.getLogger().WithError(err).Warning("Unable to delete key in kvstore")
}
... | [
"func",
"(",
"s",
"*",
"SharedStore",
")",
"DeleteLocalKey",
"(",
"key",
"NamedKey",
")",
"{",
"name",
":=",
"key",
".",
"GetKeyName",
"(",
")",
"\n\n",
"s",
".",
"mutex",
".",
"Lock",
"(",
")",
"\n",
"_",
",",
"ok",
":=",
"s",
".",
"localKeys",
... | // DeleteLocalKey removes a key from being synchronized with the kvstore | [
"DeleteLocalKey",
"removes",
"a",
"key",
"from",
"being",
"synchronized",
"with",
"the",
"kvstore"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/kvstore/store/store.go#L360-L377 |
163,816 | cilium/cilium | pkg/kvstore/store/store.go | getLocalKeys | func (s *SharedStore) getLocalKeys() []Key {
s.mutex.RLock()
defer s.mutex.RUnlock()
keys := make([]Key, len(s.localKeys))
idx := 0
for _, key := range s.localKeys {
keys[idx] = key
idx++
}
return keys
} | go | func (s *SharedStore) getLocalKeys() []Key {
s.mutex.RLock()
defer s.mutex.RUnlock()
keys := make([]Key, len(s.localKeys))
idx := 0
for _, key := range s.localKeys {
keys[idx] = key
idx++
}
return keys
} | [
"func",
"(",
"s",
"*",
"SharedStore",
")",
"getLocalKeys",
"(",
")",
"[",
"]",
"Key",
"{",
"s",
".",
"mutex",
".",
"RLock",
"(",
")",
"\n",
"defer",
"s",
".",
"mutex",
".",
"RUnlock",
"(",
")",
"\n\n",
"keys",
":=",
"make",
"(",
"[",
"]",
"Key"... | // getLocalKeys returns all local keys | [
"getLocalKeys",
"returns",
"all",
"local",
"keys"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/kvstore/store/store.go#L380-L392 |
163,817 | cilium/cilium | pkg/kvstore/store/store.go | getSharedKeys | func (s *SharedStore) getSharedKeys() []Key {
s.mutex.RLock()
defer s.mutex.RUnlock()
keys := make([]Key, len(s.sharedKeys))
idx := 0
for _, key := range s.sharedKeys {
keys[idx] = key
idx++
}
return keys
} | go | func (s *SharedStore) getSharedKeys() []Key {
s.mutex.RLock()
defer s.mutex.RUnlock()
keys := make([]Key, len(s.sharedKeys))
idx := 0
for _, key := range s.sharedKeys {
keys[idx] = key
idx++
}
return keys
} | [
"func",
"(",
"s",
"*",
"SharedStore",
")",
"getSharedKeys",
"(",
")",
"[",
"]",
"Key",
"{",
"s",
".",
"mutex",
".",
"RLock",
"(",
")",
"\n",
"defer",
"s",
".",
"mutex",
".",
"RUnlock",
"(",
")",
"\n\n",
"keys",
":=",
"make",
"(",
"[",
"]",
"Key... | // getSharedKeys returns all shared keys | [
"getSharedKeys",
"returns",
"all",
"shared",
"keys"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/kvstore/store/store.go#L395-L407 |
163,818 | cilium/cilium | pkg/set/set.go | SliceSubsetOf | func SliceSubsetOf(sub, main []string) (bool, []string) {
var diff []string
occurences := make(map[string]int, len(main))
result := true
for _, element := range main {
occurences[element]++
}
for _, element := range sub {
if count, ok := occurences[element]; !ok {
// Element was not found in the main slice... | go | func SliceSubsetOf(sub, main []string) (bool, []string) {
var diff []string
occurences := make(map[string]int, len(main))
result := true
for _, element := range main {
occurences[element]++
}
for _, element := range sub {
if count, ok := occurences[element]; !ok {
// Element was not found in the main slice... | [
"func",
"SliceSubsetOf",
"(",
"sub",
",",
"main",
"[",
"]",
"string",
")",
"(",
"bool",
",",
"[",
"]",
"string",
")",
"{",
"var",
"diff",
"[",
"]",
"string",
"\n",
"occurences",
":=",
"make",
"(",
"map",
"[",
"string",
"]",
"int",
",",
"len",
"("... | // SliceSubsetOf checks whether the first slice is a subset of the second slice. If
// not, it also returns slice of elements which are the difference of both
// input slices. | [
"SliceSubsetOf",
"checks",
"whether",
"the",
"first",
"slice",
"is",
"a",
"subset",
"of",
"the",
"second",
"slice",
".",
"If",
"not",
"it",
"also",
"returns",
"slice",
"of",
"elements",
"which",
"are",
"the",
"difference",
"of",
"both",
"input",
"slices",
... | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/set/set.go#L20-L41 |
163,819 | cilium/cilium | api/v1/server/restapi/endpoint/get_endpoint_id_config_responses.go | WithPayload | func (o *GetEndpointIDConfigOK) WithPayload(payload *models.EndpointConfigurationStatus) *GetEndpointIDConfigOK {
o.Payload = payload
return o
} | go | func (o *GetEndpointIDConfigOK) WithPayload(payload *models.EndpointConfigurationStatus) *GetEndpointIDConfigOK {
o.Payload = payload
return o
} | [
"func",
"(",
"o",
"*",
"GetEndpointIDConfigOK",
")",
"WithPayload",
"(",
"payload",
"*",
"models",
".",
"EndpointConfigurationStatus",
")",
"*",
"GetEndpointIDConfigOK",
"{",
"o",
".",
"Payload",
"=",
"payload",
"\n",
"return",
"o",
"\n",
"}"
] | // WithPayload adds the payload to the get endpoint Id config o k response | [
"WithPayload",
"adds",
"the",
"payload",
"to",
"the",
"get",
"endpoint",
"Id",
"config",
"o",
"k",
"response"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/server/restapi/endpoint/get_endpoint_id_config_responses.go#L38-L41 |
163,820 | cilium/cilium | pkg/monitor/datapath_drop.go | DumpInfo | func (n *DropNotify) DumpInfo(data []byte) {
fmt.Printf("xx drop (%s) flow %#x to endpoint %d, identity %d->%d: %s\n",
api.DropReason(n.SubType), n.Hash, n.DstID, n.SrcLabel, n.DstLabel,
GetConnectionSummary(data[DropNotifyLen:]))
} | go | func (n *DropNotify) DumpInfo(data []byte) {
fmt.Printf("xx drop (%s) flow %#x to endpoint %d, identity %d->%d: %s\n",
api.DropReason(n.SubType), n.Hash, n.DstID, n.SrcLabel, n.DstLabel,
GetConnectionSummary(data[DropNotifyLen:]))
} | [
"func",
"(",
"n",
"*",
"DropNotify",
")",
"DumpInfo",
"(",
"data",
"[",
"]",
"byte",
")",
"{",
"fmt",
".",
"Printf",
"(",
"\"",
"\\n",
"\"",
",",
"api",
".",
"DropReason",
"(",
"n",
".",
"SubType",
")",
",",
"n",
".",
"Hash",
",",
"n",
".",
"... | // DumpInfo prints a summary of the drop messages. | [
"DumpInfo",
"prints",
"a",
"summary",
"of",
"the",
"drop",
"messages",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/monitor/datapath_drop.go#L45-L49 |
163,821 | cilium/cilium | pkg/monitor/datapath_drop.go | DumpVerbose | func (n *DropNotify) DumpVerbose(dissect bool, data []byte, prefix string) {
fmt.Printf("%s MARK %#x FROM %d DROP: %d bytes, reason %s",
prefix, n.Hash, n.Source, n.OrigLen, api.DropReason(n.SubType))
if n.SrcLabel != 0 || n.DstLabel != 0 {
fmt.Printf(", identity %d->%d", n.SrcLabel, n.DstLabel)
}
if n.DstID ... | go | func (n *DropNotify) DumpVerbose(dissect bool, data []byte, prefix string) {
fmt.Printf("%s MARK %#x FROM %d DROP: %d bytes, reason %s",
prefix, n.Hash, n.Source, n.OrigLen, api.DropReason(n.SubType))
if n.SrcLabel != 0 || n.DstLabel != 0 {
fmt.Printf(", identity %d->%d", n.SrcLabel, n.DstLabel)
}
if n.DstID ... | [
"func",
"(",
"n",
"*",
"DropNotify",
")",
"DumpVerbose",
"(",
"dissect",
"bool",
",",
"data",
"[",
"]",
"byte",
",",
"prefix",
"string",
")",
"{",
"fmt",
".",
"Printf",
"(",
"\"",
"\"",
",",
"prefix",
",",
"n",
".",
"Hash",
",",
"n",
".",
"Source... | // DumpVerbose prints the drop notification in human readable form | [
"DumpVerbose",
"prints",
"the",
"drop",
"notification",
"in",
"human",
"readable",
"form"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/monitor/datapath_drop.go#L52-L69 |
163,822 | cilium/cilium | pkg/monitor/datapath_drop.go | DropNotifyToVerbose | func DropNotifyToVerbose(n *DropNotify) DropNotifyVerbose {
return DropNotifyVerbose{
Type: "drop",
Mark: fmt.Sprintf("%#x", n.Hash),
Reason: api.DropReason(n.SubType),
Source: n.Source,
Bytes: n.OrigLen,
SrcLabel: n.SrcLabel,
DstLabel: n.DstLabel,
DstID: n.DstID,
}
} | go | func DropNotifyToVerbose(n *DropNotify) DropNotifyVerbose {
return DropNotifyVerbose{
Type: "drop",
Mark: fmt.Sprintf("%#x", n.Hash),
Reason: api.DropReason(n.SubType),
Source: n.Source,
Bytes: n.OrigLen,
SrcLabel: n.SrcLabel,
DstLabel: n.DstLabel,
DstID: n.DstID,
}
} | [
"func",
"DropNotifyToVerbose",
"(",
"n",
"*",
"DropNotify",
")",
"DropNotifyVerbose",
"{",
"return",
"DropNotifyVerbose",
"{",
"Type",
":",
"\"",
"\"",
",",
"Mark",
":",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"n",
".",
"Hash",
")",
",",
"Reason",
... | //DropNotifyToVerbose creates verbose notification from DropNotify | [
"DropNotifyToVerbose",
"creates",
"verbose",
"notification",
"from",
"DropNotify"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/monitor/datapath_drop.go#L108-L119 |
163,823 | cilium/cilium | pkg/identity/numericidentity.go | InitWellKnownIdentities | func InitWellKnownIdentities() {
// Derive the namespace in which the Cilium components are running
namespace := option.Config.K8sNamespace
// etcd-operator labels
// k8s:io.cilium.k8s.policy.serviceaccount=cilium-etcd-sa
// k8s:io.kubernetes.pod.namespace=<NAMESPACE>
// k8s:io.cilium/app=etcd-operator
//... | go | func InitWellKnownIdentities() {
// Derive the namespace in which the Cilium components are running
namespace := option.Config.K8sNamespace
// etcd-operator labels
// k8s:io.cilium.k8s.policy.serviceaccount=cilium-etcd-sa
// k8s:io.kubernetes.pod.namespace=<NAMESPACE>
// k8s:io.cilium/app=etcd-operator
//... | [
"func",
"InitWellKnownIdentities",
"(",
")",
"{",
"// Derive the namespace in which the Cilium components are running",
"namespace",
":=",
"option",
".",
"Config",
".",
"K8sNamespace",
"\n\n",
"// etcd-operator labels",
"// k8s:io.cilium.k8s.policy.serviceaccount=cilium-etcd-sa",
"... | // InitWellKnownIdentities establishes all well-known identities | [
"InitWellKnownIdentities",
"establishes",
"all",
"well",
"-",
"known",
"identities"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/identity/numericidentity.go#L147-L261 |
163,824 | cilium/cilium | pkg/identity/numericidentity.go | IsUserReservedIdentity | func IsUserReservedIdentity(id NumericIdentity) bool {
return id.Uint32() >= UserReservedNumericIdentity.Uint32() &&
id.Uint32() < MinimalNumericIdentity.Uint32()
} | go | func IsUserReservedIdentity(id NumericIdentity) bool {
return id.Uint32() >= UserReservedNumericIdentity.Uint32() &&
id.Uint32() < MinimalNumericIdentity.Uint32()
} | [
"func",
"IsUserReservedIdentity",
"(",
"id",
"NumericIdentity",
")",
"bool",
"{",
"return",
"id",
".",
"Uint32",
"(",
")",
">=",
"UserReservedNumericIdentity",
".",
"Uint32",
"(",
")",
"&&",
"id",
".",
"Uint32",
"(",
")",
"<",
"MinimalNumericIdentity",
".",
... | // IsUserReservedIdentity returns true if the given NumericIdentity belongs
// to the space reserved for users. | [
"IsUserReservedIdentity",
"returns",
"true",
"if",
"the",
"given",
"NumericIdentity",
"belongs",
"to",
"the",
"space",
"reserved",
"for",
"users",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/identity/numericidentity.go#L289-L292 |
163,825 | cilium/cilium | pkg/identity/numericidentity.go | AddUserDefinedNumericIdentity | func AddUserDefinedNumericIdentity(identity NumericIdentity, label string) error {
if !IsUserReservedIdentity(identity) {
return ErrNotUserIdentity
}
reservedIdentities[label] = identity
reservedIdentityNames[identity] = label
return nil
} | go | func AddUserDefinedNumericIdentity(identity NumericIdentity, label string) error {
if !IsUserReservedIdentity(identity) {
return ErrNotUserIdentity
}
reservedIdentities[label] = identity
reservedIdentityNames[identity] = label
return nil
} | [
"func",
"AddUserDefinedNumericIdentity",
"(",
"identity",
"NumericIdentity",
",",
"label",
"string",
")",
"error",
"{",
"if",
"!",
"IsUserReservedIdentity",
"(",
"identity",
")",
"{",
"return",
"ErrNotUserIdentity",
"\n",
"}",
"\n",
"reservedIdentities",
"[",
"label... | // AddUserDefinedNumericIdentity adds the given numeric identity and respective
// label to the list of reservedIdentities. If the numeric identity is not
// between UserReservedNumericIdentity and MinimalNumericIdentity it will return
// ErrNotUserIdentity.
// Is not safe for concurrent use. | [
"AddUserDefinedNumericIdentity",
"adds",
"the",
"given",
"numeric",
"identity",
"and",
"respective",
"label",
"to",
"the",
"list",
"of",
"reservedIdentities",
".",
"If",
"the",
"numeric",
"identity",
"is",
"not",
"between",
"UserReservedNumericIdentity",
"and",
"Minim... | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/identity/numericidentity.go#L299-L306 |
163,826 | cilium/cilium | pkg/identity/numericidentity.go | DelReservedNumericIdentity | func DelReservedNumericIdentity(identity NumericIdentity) error {
if !IsUserReservedIdentity(identity) {
return ErrNotUserIdentity
}
label, ok := reservedIdentityNames[identity]
if ok {
delete(reservedIdentities, label)
delete(reservedIdentityNames, identity)
}
return nil
} | go | func DelReservedNumericIdentity(identity NumericIdentity) error {
if !IsUserReservedIdentity(identity) {
return ErrNotUserIdentity
}
label, ok := reservedIdentityNames[identity]
if ok {
delete(reservedIdentities, label)
delete(reservedIdentityNames, identity)
}
return nil
} | [
"func",
"DelReservedNumericIdentity",
"(",
"identity",
"NumericIdentity",
")",
"error",
"{",
"if",
"!",
"IsUserReservedIdentity",
"(",
"identity",
")",
"{",
"return",
"ErrNotUserIdentity",
"\n",
"}",
"\n",
"label",
",",
"ok",
":=",
"reservedIdentityNames",
"[",
"i... | // DelReservedNumericIdentity deletes the given Numeric Identity from the list
// of reservedIdentities. If the numeric identity is not between
// UserReservedNumericIdentity and MinimalNumericIdentity it will return
// ErrNotUserIdentity.
// Is not safe for concurrent use. | [
"DelReservedNumericIdentity",
"deletes",
"the",
"given",
"Numeric",
"Identity",
"from",
"the",
"list",
"of",
"reservedIdentities",
".",
"If",
"the",
"numeric",
"identity",
"is",
"not",
"between",
"UserReservedNumericIdentity",
"and",
"MinimalNumericIdentity",
"it",
"wil... | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/identity/numericidentity.go#L313-L323 |
163,827 | cilium/cilium | pkg/identity/numericidentity.go | GetAllReservedIdentities | func GetAllReservedIdentities() []NumericIdentity {
identities := []NumericIdentity{}
for _, id := range reservedIdentities {
identities = append(identities, id)
}
return identities
} | go | func GetAllReservedIdentities() []NumericIdentity {
identities := []NumericIdentity{}
for _, id := range reservedIdentities {
identities = append(identities, id)
}
return identities
} | [
"func",
"GetAllReservedIdentities",
"(",
")",
"[",
"]",
"NumericIdentity",
"{",
"identities",
":=",
"[",
"]",
"NumericIdentity",
"{",
"}",
"\n",
"for",
"_",
",",
"id",
":=",
"range",
"reservedIdentities",
"{",
"identities",
"=",
"append",
"(",
"identities",
... | // GetAllReservedIdentities returns a list of all reserved numeric identities. | [
"GetAllReservedIdentities",
"returns",
"a",
"list",
"of",
"all",
"reserved",
"numeric",
"identities",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/identity/numericidentity.go#L377-L383 |
163,828 | cilium/cilium | pkg/identity/numericidentity.go | IterateReservedIdentities | func IterateReservedIdentities(f func(key string, value NumericIdentity)) {
for key, value := range reservedIdentities {
f(key, value)
}
} | go | func IterateReservedIdentities(f func(key string, value NumericIdentity)) {
for key, value := range reservedIdentities {
f(key, value)
}
} | [
"func",
"IterateReservedIdentities",
"(",
"f",
"func",
"(",
"key",
"string",
",",
"value",
"NumericIdentity",
")",
")",
"{",
"for",
"key",
",",
"value",
":=",
"range",
"reservedIdentities",
"{",
"f",
"(",
"key",
",",
"value",
")",
"\n",
"}",
"\n",
"}"
] | // IterateReservedIdentities iterates over all reservedIdentities and executes
// the given function for each key, value pair in reservedIdentities. | [
"IterateReservedIdentities",
"iterates",
"over",
"all",
"reservedIdentities",
"and",
"executes",
"the",
"given",
"function",
"for",
"each",
"key",
"value",
"pair",
"in",
"reservedIdentities",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/identity/numericidentity.go#L387-L391 |
163,829 | cilium/cilium | api/v1/client/cilium_client.go | NewHTTPClientWithConfig | func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Cilium {
// ensure nullable parameters have default
if cfg == nil {
cfg = DefaultTransportConfig()
}
// create transport and client
transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes)
return New(transport, formats)
} | go | func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Cilium {
// ensure nullable parameters have default
if cfg == nil {
cfg = DefaultTransportConfig()
}
// create transport and client
transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes)
return New(transport, formats)
} | [
"func",
"NewHTTPClientWithConfig",
"(",
"formats",
"strfmt",
".",
"Registry",
",",
"cfg",
"*",
"TransportConfig",
")",
"*",
"Cilium",
"{",
"// ensure nullable parameters have default",
"if",
"cfg",
"==",
"nil",
"{",
"cfg",
"=",
"DefaultTransportConfig",
"(",
")",
... | // NewHTTPClientWithConfig creates a new cilium HTTP client,
// using a customizable transport config. | [
"NewHTTPClientWithConfig",
"creates",
"a",
"new",
"cilium",
"HTTP",
"client",
"using",
"a",
"customizable",
"transport",
"config",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/client/cilium_client.go#L45-L54 |
163,830 | cilium/cilium | api/v1/client/cilium_client.go | New | func New(transport runtime.ClientTransport, formats strfmt.Registry) *Cilium {
// ensure nullable parameters have default
if formats == nil {
formats = strfmt.Default
}
cli := new(Cilium)
cli.Transport = transport
cli.Daemon = daemon.New(transport, formats)
cli.Endpoint = endpoint.New(transport, formats)
... | go | func New(transport runtime.ClientTransport, formats strfmt.Registry) *Cilium {
// ensure nullable parameters have default
if formats == nil {
formats = strfmt.Default
}
cli := new(Cilium)
cli.Transport = transport
cli.Daemon = daemon.New(transport, formats)
cli.Endpoint = endpoint.New(transport, formats)
... | [
"func",
"New",
"(",
"transport",
"runtime",
".",
"ClientTransport",
",",
"formats",
"strfmt",
".",
"Registry",
")",
"*",
"Cilium",
"{",
"// ensure nullable parameters have default",
"if",
"formats",
"==",
"nil",
"{",
"formats",
"=",
"strfmt",
".",
"Default",
"\n... | // New creates a new cilium client | [
"New",
"creates",
"a",
"new",
"cilium",
"client"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/client/cilium_client.go#L57-L81 |
163,831 | cilium/cilium | api/v1/client/endpoint/get_endpoint_parameters.go | WithTimeout | func (o *GetEndpointParams) WithTimeout(timeout time.Duration) *GetEndpointParams {
o.SetTimeout(timeout)
return o
} | go | func (o *GetEndpointParams) WithTimeout(timeout time.Duration) *GetEndpointParams {
o.SetTimeout(timeout)
return o
} | [
"func",
"(",
"o",
"*",
"GetEndpointParams",
")",
"WithTimeout",
"(",
"timeout",
"time",
".",
"Duration",
")",
"*",
"GetEndpointParams",
"{",
"o",
".",
"SetTimeout",
"(",
"timeout",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithTimeout adds the timeout to the get endpoint params | [
"WithTimeout",
"adds",
"the",
"timeout",
"to",
"the",
"get",
"endpoint",
"params"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/client/endpoint/get_endpoint_parameters.go#L79-L82 |
163,832 | cilium/cilium | api/v1/client/endpoint/get_endpoint_parameters.go | WithContext | func (o *GetEndpointParams) WithContext(ctx context.Context) *GetEndpointParams {
o.SetContext(ctx)
return o
} | go | func (o *GetEndpointParams) WithContext(ctx context.Context) *GetEndpointParams {
o.SetContext(ctx)
return o
} | [
"func",
"(",
"o",
"*",
"GetEndpointParams",
")",
"WithContext",
"(",
"ctx",
"context",
".",
"Context",
")",
"*",
"GetEndpointParams",
"{",
"o",
".",
"SetContext",
"(",
"ctx",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithContext adds the context to the get endpoint params | [
"WithContext",
"adds",
"the",
"context",
"to",
"the",
"get",
"endpoint",
"params"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/client/endpoint/get_endpoint_parameters.go#L90-L93 |
163,833 | cilium/cilium | api/v1/client/endpoint/get_endpoint_parameters.go | WithHTTPClient | func (o *GetEndpointParams) WithHTTPClient(client *http.Client) *GetEndpointParams {
o.SetHTTPClient(client)
return o
} | go | func (o *GetEndpointParams) WithHTTPClient(client *http.Client) *GetEndpointParams {
o.SetHTTPClient(client)
return o
} | [
"func",
"(",
"o",
"*",
"GetEndpointParams",
")",
"WithHTTPClient",
"(",
"client",
"*",
"http",
".",
"Client",
")",
"*",
"GetEndpointParams",
"{",
"o",
".",
"SetHTTPClient",
"(",
"client",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithHTTPClient adds the HTTPClient to the get endpoint params | [
"WithHTTPClient",
"adds",
"the",
"HTTPClient",
"to",
"the",
"get",
"endpoint",
"params"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/client/endpoint/get_endpoint_parameters.go#L101-L104 |
163,834 | cilium/cilium | api/v1/client/endpoint/get_endpoint_parameters.go | WithLabels | func (o *GetEndpointParams) WithLabels(labels models.Labels) *GetEndpointParams {
o.SetLabels(labels)
return o
} | go | func (o *GetEndpointParams) WithLabels(labels models.Labels) *GetEndpointParams {
o.SetLabels(labels)
return o
} | [
"func",
"(",
"o",
"*",
"GetEndpointParams",
")",
"WithLabels",
"(",
"labels",
"models",
".",
"Labels",
")",
"*",
"GetEndpointParams",
"{",
"o",
".",
"SetLabels",
"(",
"labels",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithLabels adds the labels to the get endpoint params | [
"WithLabels",
"adds",
"the",
"labels",
"to",
"the",
"get",
"endpoint",
"params"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/client/endpoint/get_endpoint_parameters.go#L112-L115 |
163,835 | cilium/cilium | api/v1/server/restapi/service/put_service_id_responses.go | WithPayload | func (o *PutServiceIDInvalidFrontend) WithPayload(payload models.Error) *PutServiceIDInvalidFrontend {
o.Payload = payload
return o
} | go | func (o *PutServiceIDInvalidFrontend) WithPayload(payload models.Error) *PutServiceIDInvalidFrontend {
o.Payload = payload
return o
} | [
"func",
"(",
"o",
"*",
"PutServiceIDInvalidFrontend",
")",
"WithPayload",
"(",
"payload",
"models",
".",
"Error",
")",
"*",
"PutServiceIDInvalidFrontend",
"{",
"o",
".",
"Payload",
"=",
"payload",
"\n",
"return",
"o",
"\n",
"}"
] | // WithPayload adds the payload to the put service Id invalid frontend response | [
"WithPayload",
"adds",
"the",
"payload",
"to",
"the",
"put",
"service",
"Id",
"invalid",
"frontend",
"response"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/server/restapi/service/put_service_id_responses.go#L86-L89 |
163,836 | cilium/cilium | api/v1/server/restapi/service/put_service_id_responses.go | WithPayload | func (o *PutServiceIDInvalidBackend) WithPayload(payload models.Error) *PutServiceIDInvalidBackend {
o.Payload = payload
return o
} | go | func (o *PutServiceIDInvalidBackend) WithPayload(payload models.Error) *PutServiceIDInvalidBackend {
o.Payload = payload
return o
} | [
"func",
"(",
"o",
"*",
"PutServiceIDInvalidBackend",
")",
"WithPayload",
"(",
"payload",
"models",
".",
"Error",
")",
"*",
"PutServiceIDInvalidBackend",
"{",
"o",
".",
"Payload",
"=",
"payload",
"\n",
"return",
"o",
"\n",
"}"
] | // WithPayload adds the payload to the put service Id invalid backend response | [
"WithPayload",
"adds",
"the",
"payload",
"to",
"the",
"put",
"service",
"Id",
"invalid",
"backend",
"response"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/server/restapi/service/put_service_id_responses.go#L128-L131 |
163,837 | cilium/cilium | api/v1/server/restapi/service/put_service_id_responses.go | WithPayload | func (o *PutServiceIDFailure) WithPayload(payload models.Error) *PutServiceIDFailure {
o.Payload = payload
return o
} | go | func (o *PutServiceIDFailure) WithPayload(payload models.Error) *PutServiceIDFailure {
o.Payload = payload
return o
} | [
"func",
"(",
"o",
"*",
"PutServiceIDFailure",
")",
"WithPayload",
"(",
"payload",
"models",
".",
"Error",
")",
"*",
"PutServiceIDFailure",
"{",
"o",
".",
"Payload",
"=",
"payload",
"\n",
"return",
"o",
"\n",
"}"
] | // WithPayload adds the payload to the put service Id failure response | [
"WithPayload",
"adds",
"the",
"payload",
"to",
"the",
"put",
"service",
"Id",
"failure",
"response"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/server/restapi/service/put_service_id_responses.go#L170-L173 |
163,838 | cilium/cilium | pkg/endpoint/connector/ipvlan.go | CreateIpvlanSlave | func CreateIpvlanSlave(id string, mtu, masterDev int, mode string, ep *models.EndpointChangeRequest) (*netlink.IPVlan, *netlink.Link, string, error) {
if id == "" {
return nil, nil, "", fmt.Errorf("invalid: empty ID")
}
tmpIfName := Endpoint2TempIfName(id)
ipvlan, link, err := createIpvlanSlave(tmpIfName, mtu, m... | go | func CreateIpvlanSlave(id string, mtu, masterDev int, mode string, ep *models.EndpointChangeRequest) (*netlink.IPVlan, *netlink.Link, string, error) {
if id == "" {
return nil, nil, "", fmt.Errorf("invalid: empty ID")
}
tmpIfName := Endpoint2TempIfName(id)
ipvlan, link, err := createIpvlanSlave(tmpIfName, mtu, m... | [
"func",
"CreateIpvlanSlave",
"(",
"id",
"string",
",",
"mtu",
",",
"masterDev",
"int",
",",
"mode",
"string",
",",
"ep",
"*",
"models",
".",
"EndpointChangeRequest",
")",
"(",
"*",
"netlink",
".",
"IPVlan",
",",
"*",
"netlink",
".",
"Link",
",",
"string"... | // CreateIpvlanSlave creates an ipvlan slave in L3 based on the master device. | [
"CreateIpvlanSlave",
"creates",
"an",
"ipvlan",
"slave",
"in",
"L3",
"based",
"on",
"the",
"master",
"device",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/endpoint/connector/ipvlan.go#L220-L229 |
163,839 | cilium/cilium | api/v1/server/restapi/endpoint/delete_endpoint_id.go | NewDeleteEndpointID | func NewDeleteEndpointID(ctx *middleware.Context, handler DeleteEndpointIDHandler) *DeleteEndpointID {
return &DeleteEndpointID{Context: ctx, Handler: handler}
} | go | func NewDeleteEndpointID(ctx *middleware.Context, handler DeleteEndpointIDHandler) *DeleteEndpointID {
return &DeleteEndpointID{Context: ctx, Handler: handler}
} | [
"func",
"NewDeleteEndpointID",
"(",
"ctx",
"*",
"middleware",
".",
"Context",
",",
"handler",
"DeleteEndpointIDHandler",
")",
"*",
"DeleteEndpointID",
"{",
"return",
"&",
"DeleteEndpointID",
"{",
"Context",
":",
"ctx",
",",
"Handler",
":",
"handler",
"}",
"\n",
... | // NewDeleteEndpointID creates a new http.Handler for the delete endpoint ID operation | [
"NewDeleteEndpointID",
"creates",
"a",
"new",
"http",
".",
"Handler",
"for",
"the",
"delete",
"endpoint",
"ID",
"operation"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/server/restapi/endpoint/delete_endpoint_id.go#L28-L30 |
163,840 | cilium/cilium | pkg/revert/finalize.go | Append | func (f *FinalizeList) Append(finalizeFunc FinalizeFunc) {
if finalizeFunc != nil {
f.finalizeFuncs = append(f.finalizeFuncs, finalizeFunc)
}
} | go | func (f *FinalizeList) Append(finalizeFunc FinalizeFunc) {
if finalizeFunc != nil {
f.finalizeFuncs = append(f.finalizeFuncs, finalizeFunc)
}
} | [
"func",
"(",
"f",
"*",
"FinalizeList",
")",
"Append",
"(",
"finalizeFunc",
"FinalizeFunc",
")",
"{",
"if",
"finalizeFunc",
"!=",
"nil",
"{",
"f",
".",
"finalizeFuncs",
"=",
"append",
"(",
"f",
".",
"finalizeFuncs",
",",
"finalizeFunc",
")",
"\n",
"}",
"\... | // Append appends the given FinalizeFunc at the end of this list. If the
// function is nil, it is ignored. | [
"Append",
"appends",
"the",
"given",
"FinalizeFunc",
"at",
"the",
"end",
"of",
"this",
"list",
".",
"If",
"the",
"function",
"is",
"nil",
"it",
"is",
"ignored",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/revert/finalize.go#L35-L39 |
163,841 | cilium/cilium | api/v1/server/restapi/endpoint/patch_endpoint_id_responses.go | WithPayload | func (o *PatchEndpointIDInvalid) WithPayload(payload models.Error) *PatchEndpointIDInvalid {
o.Payload = payload
return o
} | go | func (o *PatchEndpointIDInvalid) WithPayload(payload models.Error) *PatchEndpointIDInvalid {
o.Payload = payload
return o
} | [
"func",
"(",
"o",
"*",
"PatchEndpointIDInvalid",
")",
"WithPayload",
"(",
"payload",
"models",
".",
"Error",
")",
"*",
"PatchEndpointIDInvalid",
"{",
"o",
".",
"Payload",
"=",
"payload",
"\n",
"return",
"o",
"\n",
"}"
] | // WithPayload adds the payload to the patch endpoint Id invalid response | [
"WithPayload",
"adds",
"the",
"payload",
"to",
"the",
"patch",
"endpoint",
"Id",
"invalid",
"response"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/server/restapi/endpoint/patch_endpoint_id_responses.go#L62-L65 |
163,842 | cilium/cilium | api/v1/server/restapi/endpoint/patch_endpoint_id_responses.go | WithPayload | func (o *PatchEndpointIDFailed) WithPayload(payload models.Error) *PatchEndpointIDFailed {
o.Payload = payload
return o
} | go | func (o *PatchEndpointIDFailed) WithPayload(payload models.Error) *PatchEndpointIDFailed {
o.Payload = payload
return o
} | [
"func",
"(",
"o",
"*",
"PatchEndpointIDFailed",
")",
"WithPayload",
"(",
"payload",
"models",
".",
"Error",
")",
"*",
"PatchEndpointIDFailed",
"{",
"o",
".",
"Payload",
"=",
"payload",
"\n",
"return",
"o",
"\n",
"}"
] | // WithPayload adds the payload to the patch endpoint Id failed response | [
"WithPayload",
"adds",
"the",
"payload",
"to",
"the",
"patch",
"endpoint",
"Id",
"failed",
"response"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/server/restapi/endpoint/patch_endpoint_id_responses.go#L128-L131 |
163,843 | cilium/cilium | api/v1/client/ipam/delete_ip_a_m_ip_parameters.go | WithTimeout | func (o *DeleteIPAMIPParams) WithTimeout(timeout time.Duration) *DeleteIPAMIPParams {
o.SetTimeout(timeout)
return o
} | go | func (o *DeleteIPAMIPParams) WithTimeout(timeout time.Duration) *DeleteIPAMIPParams {
o.SetTimeout(timeout)
return o
} | [
"func",
"(",
"o",
"*",
"DeleteIPAMIPParams",
")",
"WithTimeout",
"(",
"timeout",
"time",
".",
"Duration",
")",
"*",
"DeleteIPAMIPParams",
"{",
"o",
".",
"SetTimeout",
"(",
"timeout",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithTimeout adds the timeout to the delete IP a m IP params | [
"WithTimeout",
"adds",
"the",
"timeout",
"to",
"the",
"delete",
"IP",
"a",
"m",
"IP",
"params"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/client/ipam/delete_ip_a_m_ip_parameters.go#L76-L79 |
163,844 | cilium/cilium | api/v1/client/ipam/delete_ip_a_m_ip_parameters.go | WithContext | func (o *DeleteIPAMIPParams) WithContext(ctx context.Context) *DeleteIPAMIPParams {
o.SetContext(ctx)
return o
} | go | func (o *DeleteIPAMIPParams) WithContext(ctx context.Context) *DeleteIPAMIPParams {
o.SetContext(ctx)
return o
} | [
"func",
"(",
"o",
"*",
"DeleteIPAMIPParams",
")",
"WithContext",
"(",
"ctx",
"context",
".",
"Context",
")",
"*",
"DeleteIPAMIPParams",
"{",
"o",
".",
"SetContext",
"(",
"ctx",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithContext adds the context to the delete IP a m IP params | [
"WithContext",
"adds",
"the",
"context",
"to",
"the",
"delete",
"IP",
"a",
"m",
"IP",
"params"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/client/ipam/delete_ip_a_m_ip_parameters.go#L87-L90 |
163,845 | cilium/cilium | api/v1/client/ipam/delete_ip_a_m_ip_parameters.go | WithHTTPClient | func (o *DeleteIPAMIPParams) WithHTTPClient(client *http.Client) *DeleteIPAMIPParams {
o.SetHTTPClient(client)
return o
} | go | func (o *DeleteIPAMIPParams) WithHTTPClient(client *http.Client) *DeleteIPAMIPParams {
o.SetHTTPClient(client)
return o
} | [
"func",
"(",
"o",
"*",
"DeleteIPAMIPParams",
")",
"WithHTTPClient",
"(",
"client",
"*",
"http",
".",
"Client",
")",
"*",
"DeleteIPAMIPParams",
"{",
"o",
".",
"SetHTTPClient",
"(",
"client",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithHTTPClient adds the HTTPClient to the delete IP a m IP params | [
"WithHTTPClient",
"adds",
"the",
"HTTPClient",
"to",
"the",
"delete",
"IP",
"a",
"m",
"IP",
"params"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/client/ipam/delete_ip_a_m_ip_parameters.go#L98-L101 |
163,846 | cilium/cilium | api/v1/client/ipam/delete_ip_a_m_ip_parameters.go | WithIP | func (o *DeleteIPAMIPParams) WithIP(ip string) *DeleteIPAMIPParams {
o.SetIP(ip)
return o
} | go | func (o *DeleteIPAMIPParams) WithIP(ip string) *DeleteIPAMIPParams {
o.SetIP(ip)
return o
} | [
"func",
"(",
"o",
"*",
"DeleteIPAMIPParams",
")",
"WithIP",
"(",
"ip",
"string",
")",
"*",
"DeleteIPAMIPParams",
"{",
"o",
".",
"SetIP",
"(",
"ip",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithIP adds the ip to the delete IP a m IP params | [
"WithIP",
"adds",
"the",
"ip",
"to",
"the",
"delete",
"IP",
"a",
"m",
"IP",
"params"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/client/ipam/delete_ip_a_m_ip_parameters.go#L109-L112 |
163,847 | cilium/cilium | api/v1/server/restapi/daemon/get_debuginfo.go | NewGetDebuginfo | func NewGetDebuginfo(ctx *middleware.Context, handler GetDebuginfoHandler) *GetDebuginfo {
return &GetDebuginfo{Context: ctx, Handler: handler}
} | go | func NewGetDebuginfo(ctx *middleware.Context, handler GetDebuginfoHandler) *GetDebuginfo {
return &GetDebuginfo{Context: ctx, Handler: handler}
} | [
"func",
"NewGetDebuginfo",
"(",
"ctx",
"*",
"middleware",
".",
"Context",
",",
"handler",
"GetDebuginfoHandler",
")",
"*",
"GetDebuginfo",
"{",
"return",
"&",
"GetDebuginfo",
"{",
"Context",
":",
"ctx",
",",
"Handler",
":",
"handler",
"}",
"\n",
"}"
] | // NewGetDebuginfo creates a new http.Handler for the get debuginfo operation | [
"NewGetDebuginfo",
"creates",
"a",
"new",
"http",
".",
"Handler",
"for",
"the",
"get",
"debuginfo",
"operation"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/server/restapi/daemon/get_debuginfo.go#L28-L30 |
163,848 | cilium/cilium | pkg/comparator/comparator.go | CompareWithNames | func CompareWithNames(a, b interface{}, nameA, nameB string) string {
stringA := pretty.Sprintf("%# v", a)
stringB := pretty.Sprintf("%# v", b)
diff := difflib.UnifiedDiff{
A: difflib.SplitLines(stringA),
B: difflib.SplitLines(stringB),
FromFile: nameA,
ToFile: nameB,
Context: 32,
}
out... | go | func CompareWithNames(a, b interface{}, nameA, nameB string) string {
stringA := pretty.Sprintf("%# v", a)
stringB := pretty.Sprintf("%# v", b)
diff := difflib.UnifiedDiff{
A: difflib.SplitLines(stringA),
B: difflib.SplitLines(stringB),
FromFile: nameA,
ToFile: nameB,
Context: 32,
}
out... | [
"func",
"CompareWithNames",
"(",
"a",
",",
"b",
"interface",
"{",
"}",
",",
"nameA",
",",
"nameB",
"string",
")",
"string",
"{",
"stringA",
":=",
"pretty",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"a",
")",
"\n",
"stringB",
":=",
"pretty",
".",
"Sprintf... | // CompareWithNames compares two interfaces and emits a unified diff as string | [
"CompareWithNames",
"compares",
"two",
"interfaces",
"and",
"emits",
"a",
"unified",
"diff",
"as",
"string"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/comparator/comparator.go#L28-L44 |
163,849 | cilium/cilium | pkg/comparator/comparator.go | MapStringEquals | func MapStringEquals(m1, m2 map[string]string) bool {
switch {
case m1 == nil && m2 == nil:
return true
case m1 == nil && m2 != nil,
m1 != nil && m2 == nil,
len(m1) != len(m2):
return false
}
for k1, v1 := range m1 {
if v2, ok := m2[k1]; !ok || v2 != v1 {
return false
}
}
return true
} | go | func MapStringEquals(m1, m2 map[string]string) bool {
switch {
case m1 == nil && m2 == nil:
return true
case m1 == nil && m2 != nil,
m1 != nil && m2 == nil,
len(m1) != len(m2):
return false
}
for k1, v1 := range m1 {
if v2, ok := m2[k1]; !ok || v2 != v1 {
return false
}
}
return true
} | [
"func",
"MapStringEquals",
"(",
"m1",
",",
"m2",
"map",
"[",
"string",
"]",
"string",
")",
"bool",
"{",
"switch",
"{",
"case",
"m1",
"==",
"nil",
"&&",
"m2",
"==",
"nil",
":",
"return",
"true",
"\n",
"case",
"m1",
"==",
"nil",
"&&",
"m2",
"!=",
"... | // MapStringEquals returns true if both maps are equal. | [
"MapStringEquals",
"returns",
"true",
"if",
"both",
"maps",
"are",
"equal",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/comparator/comparator.go#L47-L62 |
163,850 | cilium/cilium | pkg/node/store/store.go | RegisterNode | func (nr *NodeRegistrar) RegisterNode(n *node.Node, manager NodeManager) error {
// Join the shared store holding node information of entire cluster
store, err := store.JoinSharedStore(store.Configuration{
Prefix: NodeStorePrefix,
KeyCreator: KeyCreator,
Observer: NewNodeObserver(manager),
})
if err !... | go | func (nr *NodeRegistrar) RegisterNode(n *node.Node, manager NodeManager) error {
// Join the shared store holding node information of entire cluster
store, err := store.JoinSharedStore(store.Configuration{
Prefix: NodeStorePrefix,
KeyCreator: KeyCreator,
Observer: NewNodeObserver(manager),
})
if err !... | [
"func",
"(",
"nr",
"*",
"NodeRegistrar",
")",
"RegisterNode",
"(",
"n",
"*",
"node",
".",
"Node",
",",
"manager",
"NodeManager",
")",
"error",
"{",
"// Join the shared store holding node information of entire cluster",
"store",
",",
"err",
":=",
"store",
".",
"Joi... | // RegisterNode registers the local node in the cluster | [
"RegisterNode",
"registers",
"the",
"local",
"node",
"in",
"the",
"cluster"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/node/store/store.go#L117-L138 |
163,851 | cilium/cilium | pkg/node/store/store.go | UpdateLocalKeySync | func (nr *NodeRegistrar) UpdateLocalKeySync(n *node.Node) error {
return nr.SharedStore.UpdateLocalKeySync(n)
} | go | func (nr *NodeRegistrar) UpdateLocalKeySync(n *node.Node) error {
return nr.SharedStore.UpdateLocalKeySync(n)
} | [
"func",
"(",
"nr",
"*",
"NodeRegistrar",
")",
"UpdateLocalKeySync",
"(",
"n",
"*",
"node",
".",
"Node",
")",
"error",
"{",
"return",
"nr",
".",
"SharedStore",
".",
"UpdateLocalKeySync",
"(",
"n",
")",
"\n",
"}"
] | // UpdateLocalKeySync synchronizes the local key for the node using the
// SharedStore. | [
"UpdateLocalKeySync",
"synchronizes",
"the",
"local",
"key",
"for",
"the",
"node",
"using",
"the",
"SharedStore",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/node/store/store.go#L142-L144 |
163,852 | cilium/cilium | pkg/node/zz_generated.deepcopy.go | DeepCopy | func (in *Address) DeepCopy() *Address {
if in == nil {
return nil
}
out := new(Address)
in.DeepCopyInto(out)
return out
} | go | func (in *Address) DeepCopy() *Address {
if in == nil {
return nil
}
out := new(Address)
in.DeepCopyInto(out)
return out
} | [
"func",
"(",
"in",
"*",
"Address",
")",
"DeepCopy",
"(",
")",
"*",
"Address",
"{",
"if",
"in",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"out",
":=",
"new",
"(",
"Address",
")",
"\n",
"in",
".",
"DeepCopyInto",
"(",
"out",
")",
"\n",
... | // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Address. | [
"DeepCopy",
"is",
"an",
"autogenerated",
"deepcopy",
"function",
"copying",
"the",
"receiver",
"creating",
"a",
"new",
"Address",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/node/zz_generated.deepcopy.go#L37-L44 |
163,853 | cilium/cilium | pkg/policy/api/l7.go | Sanitize | func (rule *PortRuleL7) Sanitize() error {
for k := range *rule {
if k == "" {
return fmt.Errorf("Empty key not allowed")
}
}
return nil
} | go | func (rule *PortRuleL7) Sanitize() error {
for k := range *rule {
if k == "" {
return fmt.Errorf("Empty key not allowed")
}
}
return nil
} | [
"func",
"(",
"rule",
"*",
"PortRuleL7",
")",
"Sanitize",
"(",
")",
"error",
"{",
"for",
"k",
":=",
"range",
"*",
"rule",
"{",
"if",
"k",
"==",
"\"",
"\"",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"}",
"\n",
... | // Sanitize sanitizes key-value pair rules. It makes sure keys are present. | [
"Sanitize",
"sanitizes",
"key",
"-",
"value",
"pair",
"rules",
".",
"It",
"makes",
"sure",
"keys",
"are",
"present",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/policy/api/l7.go#L27-L34 |
163,854 | cilium/cilium | api/v1/server/restapi/endpoint/get_endpoint_id_responses.go | WithPayload | func (o *GetEndpointIDOK) WithPayload(payload *models.Endpoint) *GetEndpointIDOK {
o.Payload = payload
return o
} | go | func (o *GetEndpointIDOK) WithPayload(payload *models.Endpoint) *GetEndpointIDOK {
o.Payload = payload
return o
} | [
"func",
"(",
"o",
"*",
"GetEndpointIDOK",
")",
"WithPayload",
"(",
"payload",
"*",
"models",
".",
"Endpoint",
")",
"*",
"GetEndpointIDOK",
"{",
"o",
".",
"Payload",
"=",
"payload",
"\n",
"return",
"o",
"\n",
"}"
] | // WithPayload adds the payload to the get endpoint Id o k response | [
"WithPayload",
"adds",
"the",
"payload",
"to",
"the",
"get",
"endpoint",
"Id",
"o",
"k",
"response"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/server/restapi/endpoint/get_endpoint_id_responses.go#L38-L41 |
163,855 | cilium/cilium | api/v1/server/restapi/endpoint/get_endpoint_id_responses.go | WithPayload | func (o *GetEndpointIDInvalid) WithPayload(payload models.Error) *GetEndpointIDInvalid {
o.Payload = payload
return o
} | go | func (o *GetEndpointIDInvalid) WithPayload(payload models.Error) *GetEndpointIDInvalid {
o.Payload = payload
return o
} | [
"func",
"(",
"o",
"*",
"GetEndpointIDInvalid",
")",
"WithPayload",
"(",
"payload",
"models",
".",
"Error",
")",
"*",
"GetEndpointIDInvalid",
"{",
"o",
".",
"Payload",
"=",
"payload",
"\n",
"return",
"o",
"\n",
"}"
] | // WithPayload adds the payload to the get endpoint Id invalid response | [
"WithPayload",
"adds",
"the",
"payload",
"to",
"the",
"get",
"endpoint",
"Id",
"invalid",
"response"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/server/restapi/endpoint/get_endpoint_id_responses.go#L82-L85 |
163,856 | cilium/cilium | plugins/cilium-cni/types/types.go | LoadNetConf | func LoadNetConf(bytes []byte) (*NetConf, string, error) {
n := &NetConf{}
if err := json.Unmarshal(bytes, n); err != nil {
return nil, "", fmt.Errorf("failed to load netconf: %s", err)
}
return n, n.CNIVersion, nil
} | go | func LoadNetConf(bytes []byte) (*NetConf, string, error) {
n := &NetConf{}
if err := json.Unmarshal(bytes, n); err != nil {
return nil, "", fmt.Errorf("failed to load netconf: %s", err)
}
return n, n.CNIVersion, nil
} | [
"func",
"LoadNetConf",
"(",
"bytes",
"[",
"]",
"byte",
")",
"(",
"*",
"NetConf",
",",
"string",
",",
"error",
")",
"{",
"n",
":=",
"&",
"NetConf",
"{",
"}",
"\n",
"if",
"err",
":=",
"json",
".",
"Unmarshal",
"(",
"bytes",
",",
"n",
")",
";",
"e... | // LoadNetConf unmarshals a Cilium network configuration from JSON and returns
// a NetConf together with the CNI version | [
"LoadNetConf",
"unmarshals",
"a",
"Cilium",
"network",
"configuration",
"from",
"JSON",
"and",
"returns",
"a",
"NetConf",
"together",
"with",
"the",
"CNI",
"version"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/plugins/cilium-cni/types/types.go#L34-L40 |
163,857 | cilium/cilium | pkg/fqdn/lookup.go | doResolverLogic | func doResolverLogic(lookupFunc func(string, string, uint16) (*dns.Msg, error), dnsNames []string) (DNSIPs map[string]*DNSIPRecords, DNSErrors map[string]error) {
DNSIPs = make(map[string]*DNSIPRecords)
DNSErrors = make(map[string]error)
// This is the top-level list of names to query
for _, dnsName := range dnsNa... | go | func doResolverLogic(lookupFunc func(string, string, uint16) (*dns.Msg, error), dnsNames []string) (DNSIPs map[string]*DNSIPRecords, DNSErrors map[string]error) {
DNSIPs = make(map[string]*DNSIPRecords)
DNSErrors = make(map[string]error)
// This is the top-level list of names to query
for _, dnsName := range dnsNa... | [
"func",
"doResolverLogic",
"(",
"lookupFunc",
"func",
"(",
"string",
",",
"string",
",",
"uint16",
")",
"(",
"*",
"dns",
".",
"Msg",
",",
"error",
")",
",",
"dnsNames",
"[",
"]",
"string",
")",
"(",
"DNSIPs",
"map",
"[",
"string",
"]",
"*",
"DNSIPRec... | // doResolverLogic exists to allow testing the more complex logic around
// collecting A and AAAA records, handling CNAMEs and trying different servers. | [
"doResolverLogic",
"exists",
"to",
"allow",
"testing",
"the",
"more",
"complex",
"logic",
"around",
"collecting",
"A",
"and",
"AAAA",
"records",
"handling",
"CNAMEs",
"and",
"trying",
"different",
"servers",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/fqdn/lookup.go#L111-L182 |
163,858 | cilium/cilium | pkg/client/client.go | DefaultSockPath | func DefaultSockPath() string {
// Check if environment variable points to socket
e := os.Getenv(defaults.SockPathEnv)
if e == "" {
// If unset, fall back to default value
e = defaults.SockPath
}
return "unix://" + e
} | go | func DefaultSockPath() string {
// Check if environment variable points to socket
e := os.Getenv(defaults.SockPathEnv)
if e == "" {
// If unset, fall back to default value
e = defaults.SockPath
}
return "unix://" + e
} | [
"func",
"DefaultSockPath",
"(",
")",
"string",
"{",
"// Check if environment variable points to socket",
"e",
":=",
"os",
".",
"Getenv",
"(",
"defaults",
".",
"SockPathEnv",
")",
"\n",
"if",
"e",
"==",
"\"",
"\"",
"{",
"// If unset, fall back to default value",
"e",... | // DefaultSockPath returns deafult UNIX domain socket path or
// path set using CILIUM_SOCK env variable | [
"DefaultSockPath",
"returns",
"deafult",
"UNIX",
"domain",
"socket",
"path",
"or",
"path",
"set",
"using",
"CILIUM_SOCK",
"env",
"variable"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/client/client.go#L45-L54 |
163,859 | cilium/cilium | pkg/client/client.go | NewDefaultClientWithTimeout | func NewDefaultClientWithTimeout(timeout time.Duration) (*Client, error) {
timeoutAfter := time.After(timeout)
var c *Client
var err error
for {
select {
case <-timeoutAfter:
return nil, fmt.Errorf("failed to create cilium agent client after %f seconds timeout: %s", timeout.Seconds(), err)
default:
}
... | go | func NewDefaultClientWithTimeout(timeout time.Duration) (*Client, error) {
timeoutAfter := time.After(timeout)
var c *Client
var err error
for {
select {
case <-timeoutAfter:
return nil, fmt.Errorf("failed to create cilium agent client after %f seconds timeout: %s", timeout.Seconds(), err)
default:
}
... | [
"func",
"NewDefaultClientWithTimeout",
"(",
"timeout",
"time",
".",
"Duration",
")",
"(",
"*",
"Client",
",",
"error",
")",
"{",
"timeoutAfter",
":=",
"time",
".",
"After",
"(",
"timeout",
")",
"\n",
"var",
"c",
"*",
"Client",
"\n",
"var",
"err",
"error"... | // NewDefaultClientWithTimeout creates a client with default parameters connecting to UNIX
// domain socket and waits for cilium-agent availability. | [
"NewDefaultClientWithTimeout",
"creates",
"a",
"client",
"with",
"default",
"parameters",
"connecting",
"to",
"UNIX",
"domain",
"socket",
"and",
"waits",
"for",
"cilium",
"-",
"agent",
"availability",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/client/client.go#L82-L115 |
163,860 | cilium/cilium | pkg/client/client.go | NewClient | func NewClient(host string) (*Client, error) {
if host == "" {
host = DefaultSockPath()
}
tmp := strings.SplitN(host, "://", 2)
if len(tmp) != 2 {
return nil, fmt.Errorf("invalid host format '%s'", host)
}
switch tmp[0] {
case "tcp":
if _, err := url.Parse("tcp://" + tmp[1]); err != nil {
return nil, e... | go | func NewClient(host string) (*Client, error) {
if host == "" {
host = DefaultSockPath()
}
tmp := strings.SplitN(host, "://", 2)
if len(tmp) != 2 {
return nil, fmt.Errorf("invalid host format '%s'", host)
}
switch tmp[0] {
case "tcp":
if _, err := url.Parse("tcp://" + tmp[1]); err != nil {
return nil, e... | [
"func",
"NewClient",
"(",
"host",
"string",
")",
"(",
"*",
"Client",
",",
"error",
")",
"{",
"if",
"host",
"==",
"\"",
"\"",
"{",
"host",
"=",
"DefaultSockPath",
"(",
")",
"\n",
"}",
"\n",
"tmp",
":=",
"strings",
".",
"SplitN",
"(",
"host",
",",
... | // NewClient creates a client for the given `host`.
// If host is nil then use SockPath provided by CILIUM_SOCK
// or the cilium default SockPath | [
"NewClient",
"creates",
"a",
"client",
"for",
"the",
"given",
"host",
".",
"If",
"host",
"is",
"nil",
"then",
"use",
"SockPath",
"provided",
"by",
"CILIUM_SOCK",
"or",
"the",
"cilium",
"default",
"SockPath"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/client/client.go#L120-L144 |
163,861 | cilium/cilium | pkg/client/client.go | FormatStatusResponseBrief | func FormatStatusResponseBrief(w io.Writer, sr *models.StatusResponse) {
msg := ""
switch {
case statusUnhealthy(sr.Kvstore):
msg = fmt.Sprintf("kvstore: %s", sr.Kvstore.Msg)
case statusUnhealthy(sr.ContainerRuntime):
msg = fmt.Sprintf("container runtime: %s", sr.ContainerRuntime.Msg)
case sr.Kubernetes != ni... | go | func FormatStatusResponseBrief(w io.Writer, sr *models.StatusResponse) {
msg := ""
switch {
case statusUnhealthy(sr.Kvstore):
msg = fmt.Sprintf("kvstore: %s", sr.Kvstore.Msg)
case statusUnhealthy(sr.ContainerRuntime):
msg = fmt.Sprintf("container runtime: %s", sr.ContainerRuntime.Msg)
case sr.Kubernetes != ni... | [
"func",
"FormatStatusResponseBrief",
"(",
"w",
"io",
".",
"Writer",
",",
"sr",
"*",
"models",
".",
"StatusResponse",
")",
"{",
"msg",
":=",
"\"",
"\"",
"\n\n",
"switch",
"{",
"case",
"statusUnhealthy",
"(",
"sr",
".",
"Kvstore",
")",
":",
"msg",
"=",
"... | // FormatStatusResponseBrief writes a one-line status to the writer. If
// everything ok, this is "ok", otherwise a message of the form "error in ..." | [
"FormatStatusResponseBrief",
"writes",
"a",
"one",
"-",
"line",
"status",
"to",
"the",
"writer",
".",
"If",
"everything",
"ok",
"this",
"is",
"ok",
"otherwise",
"a",
"message",
"of",
"the",
"form",
"error",
"in",
"..."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/client/client.go#L214-L249 |
163,862 | cilium/cilium | pkg/client/client.go | FormatStatusResponse | func FormatStatusResponse(w io.Writer, sr *models.StatusResponse, allAddresses, allControllers, allNodes, allRedirects bool) {
if sr.Kvstore != nil {
fmt.Fprintf(w, "KVStore:\t%s\t%s\n", sr.Kvstore.State, sr.Kvstore.Msg)
}
if sr.ContainerRuntime != nil {
fmt.Fprintf(w, "ContainerRuntime:\t%s\t%s\n",
sr.Contai... | go | func FormatStatusResponse(w io.Writer, sr *models.StatusResponse, allAddresses, allControllers, allNodes, allRedirects bool) {
if sr.Kvstore != nil {
fmt.Fprintf(w, "KVStore:\t%s\t%s\n", sr.Kvstore.State, sr.Kvstore.Msg)
}
if sr.ContainerRuntime != nil {
fmt.Fprintf(w, "ContainerRuntime:\t%s\t%s\n",
sr.Contai... | [
"func",
"FormatStatusResponse",
"(",
"w",
"io",
".",
"Writer",
",",
"sr",
"*",
"models",
".",
"StatusResponse",
",",
"allAddresses",
",",
"allControllers",
",",
"allNodes",
",",
"allRedirects",
"bool",
")",
"{",
"if",
"sr",
".",
"Kvstore",
"!=",
"nil",
"{"... | // FormatStatusResponse writes a StatusResponse as a string to the writer.
//
// The parameters 'allAddresses', 'allControllers', 'allNodes', respectively,
// cause all details about that aspect of the status to be printed to the
// terminal. For each of these, if they are false then only a summary will be
// printed, ... | [
"FormatStatusResponse",
"writes",
"a",
"StatusResponse",
"as",
"a",
"string",
"to",
"the",
"writer",
".",
"The",
"parameters",
"allAddresses",
"allControllers",
"allNodes",
"respectively",
"cause",
"all",
"details",
"about",
"that",
"aspect",
"of",
"the",
"status",
... | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/client/client.go#L257-L399 |
163,863 | cilium/cilium | api/v1/models/endpoint_status.go | Validate | func (m *EndpointStatus) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateControllers(formats); err != nil {
res = append(res, err)
}
if err := m.validateExternalIdentifiers(formats); err != nil {
res = append(res, err)
}
if err := m.validateHealth(formats); err != nil {
res ... | go | func (m *EndpointStatus) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateControllers(formats); err != nil {
res = append(res, err)
}
if err := m.validateExternalIdentifiers(formats); err != nil {
res = append(res, err)
}
if err := m.validateHealth(formats); err != nil {
res ... | [
"func",
"(",
"m",
"*",
"EndpointStatus",
")",
"Validate",
"(",
"formats",
"strfmt",
".",
"Registry",
")",
"error",
"{",
"var",
"res",
"[",
"]",
"error",
"\n\n",
"if",
"err",
":=",
"m",
".",
"validateControllers",
"(",
"formats",
")",
";",
"err",
"!=",
... | // Validate validates this endpoint status | [
"Validate",
"validates",
"this",
"endpoint",
"status"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/models/endpoint_status.go#L52-L99 |
163,864 | cilium/cilium | pkg/endpoint/metrics.go | SendMetrics | func (s *regenerationStatistics) SendMetrics() {
endpointPolicyStatus.Update(s.endpointID, s.policyStatus)
metrics.EndpointCountRegenerating.Dec()
if !s.success {
// Endpoint regeneration failed, increase on failed metrics
metrics.EndpointRegenerationCount.WithLabelValues(metrics.LabelValueOutcomeFail).Inc()
... | go | func (s *regenerationStatistics) SendMetrics() {
endpointPolicyStatus.Update(s.endpointID, s.policyStatus)
metrics.EndpointCountRegenerating.Dec()
if !s.success {
// Endpoint regeneration failed, increase on failed metrics
metrics.EndpointRegenerationCount.WithLabelValues(metrics.LabelValueOutcomeFail).Inc()
... | [
"func",
"(",
"s",
"*",
"regenerationStatistics",
")",
"SendMetrics",
"(",
")",
"{",
"endpointPolicyStatus",
".",
"Update",
"(",
"s",
".",
"endpointID",
",",
"s",
".",
"policyStatus",
")",
"\n",
"metrics",
".",
"EndpointCountRegenerating",
".",
"Dec",
"(",
")... | // SendMetrics sends the regeneration statistics for this endpoint to
// Prometheus. | [
"SendMetrics",
"sends",
"the",
"regeneration",
"statistics",
"for",
"this",
"endpoint",
"to",
"Prometheus",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/endpoint/metrics.go#L72-L85 |
163,865 | cilium/cilium | pkg/endpoint/metrics.go | GetMap | func (s *regenerationStatistics) GetMap() map[string]*spanstat.SpanStat {
result := map[string]*spanstat.SpanStat{
"waitingForLock": &s.waitingForLock,
"waitingForCTClean": &s.waitingForCTClean,
"policyCalculation": &s.policyCalculation,
"proxyConfiguration": &s.proxyConfiguration,
"pro... | go | func (s *regenerationStatistics) GetMap() map[string]*spanstat.SpanStat {
result := map[string]*spanstat.SpanStat{
"waitingForLock": &s.waitingForLock,
"waitingForCTClean": &s.waitingForCTClean,
"policyCalculation": &s.policyCalculation,
"proxyConfiguration": &s.proxyConfiguration,
"pro... | [
"func",
"(",
"s",
"*",
"regenerationStatistics",
")",
"GetMap",
"(",
")",
"map",
"[",
"string",
"]",
"*",
"spanstat",
".",
"SpanStat",
"{",
"result",
":=",
"map",
"[",
"string",
"]",
"*",
"spanstat",
".",
"SpanStat",
"{",
"\"",
"\"",
":",
"&",
"s",
... | // GetMap returns a map which key is the stat name and the value is the stat | [
"GetMap",
"returns",
"a",
"map",
"which",
"key",
"is",
"the",
"stat",
"name",
"and",
"the",
"value",
"is",
"the",
"stat"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/endpoint/metrics.go#L88-L104 |
163,866 | cilium/cilium | pkg/endpoint/metrics.go | Update | func (epPolicyMaps *endpointPolicyStatusMap) Update(endpointID uint16, policyStatus models.EndpointPolicyEnabled) {
epPolicyMaps.mutex.Lock()
epPolicyMaps.m[endpointID] = policyStatus
epPolicyMaps.mutex.Unlock()
endpointPolicyStatus.UpdateMetrics()
} | go | func (epPolicyMaps *endpointPolicyStatusMap) Update(endpointID uint16, policyStatus models.EndpointPolicyEnabled) {
epPolicyMaps.mutex.Lock()
epPolicyMaps.m[endpointID] = policyStatus
epPolicyMaps.mutex.Unlock()
endpointPolicyStatus.UpdateMetrics()
} | [
"func",
"(",
"epPolicyMaps",
"*",
"endpointPolicyStatusMap",
")",
"Update",
"(",
"endpointID",
"uint16",
",",
"policyStatus",
"models",
".",
"EndpointPolicyEnabled",
")",
"{",
"epPolicyMaps",
".",
"mutex",
".",
"Lock",
"(",
")",
"\n",
"epPolicyMaps",
".",
"m",
... | // Update adds or updates a new endpoint to the map and update the metrics
// related | [
"Update",
"adds",
"or",
"updates",
"a",
"new",
"endpoint",
"to",
"the",
"map",
"and",
"update",
"the",
"metrics",
"related"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/endpoint/metrics.go#L142-L147 |
163,867 | cilium/cilium | pkg/endpoint/metrics.go | Remove | func (epPolicyMaps *endpointPolicyStatusMap) Remove(endpointID uint16) {
epPolicyMaps.mutex.Lock()
delete(epPolicyMaps.m, endpointID)
epPolicyMaps.mutex.Unlock()
epPolicyMaps.UpdateMetrics()
} | go | func (epPolicyMaps *endpointPolicyStatusMap) Remove(endpointID uint16) {
epPolicyMaps.mutex.Lock()
delete(epPolicyMaps.m, endpointID)
epPolicyMaps.mutex.Unlock()
epPolicyMaps.UpdateMetrics()
} | [
"func",
"(",
"epPolicyMaps",
"*",
"endpointPolicyStatusMap",
")",
"Remove",
"(",
"endpointID",
"uint16",
")",
"{",
"epPolicyMaps",
".",
"mutex",
".",
"Lock",
"(",
")",
"\n",
"delete",
"(",
"epPolicyMaps",
".",
"m",
",",
"endpointID",
")",
"\n",
"epPolicyMaps... | // Remove deletes the given endpoint from the map and update the metrics | [
"Remove",
"deletes",
"the",
"given",
"endpoint",
"from",
"the",
"map",
"and",
"update",
"the",
"metrics"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/endpoint/metrics.go#L150-L155 |
163,868 | cilium/cilium | pkg/endpoint/metrics.go | UpdateMetrics | func (epPolicyMaps *endpointPolicyStatusMap) UpdateMetrics() {
policyStatus := map[models.EndpointPolicyEnabled]float64{
models.EndpointPolicyEnabledNone: 0,
models.EndpointPolicyEnabledEgress: 0,
models.EndpointPolicyEnabledIngress: 0,
models.EndpointPolicyEnabledBoth: 0,
}
epPolicyMaps.mutex.Lock()... | go | func (epPolicyMaps *endpointPolicyStatusMap) UpdateMetrics() {
policyStatus := map[models.EndpointPolicyEnabled]float64{
models.EndpointPolicyEnabledNone: 0,
models.EndpointPolicyEnabledEgress: 0,
models.EndpointPolicyEnabledIngress: 0,
models.EndpointPolicyEnabledBoth: 0,
}
epPolicyMaps.mutex.Lock()... | [
"func",
"(",
"epPolicyMaps",
"*",
"endpointPolicyStatusMap",
")",
"UpdateMetrics",
"(",
")",
"{",
"policyStatus",
":=",
"map",
"[",
"models",
".",
"EndpointPolicyEnabled",
"]",
"float64",
"{",
"models",
".",
"EndpointPolicyEnabledNone",
":",
"0",
",",
"models",
... | // UpdateMetrics update the policy enforcement metrics statistics for the endpoints. | [
"UpdateMetrics",
"update",
"the",
"policy",
"enforcement",
"metrics",
"statistics",
"for",
"the",
"endpoints",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/endpoint/metrics.go#L158-L175 |
163,869 | cilium/cilium | pkg/envoy/xds/watcher.go | NewResourceWatcher | func NewResourceWatcher(typeURL string, resourceSet ResourceSource, resourceAccessTimeout time.Duration) *ResourceWatcher {
w := &ResourceWatcher{
version: 1,
typeURL: typeURL,
resourceSet: resourceSet,
resourceAccessTimeout: resourceAccessTimeout,
}
w.versionCond = sync... | go | func NewResourceWatcher(typeURL string, resourceSet ResourceSource, resourceAccessTimeout time.Duration) *ResourceWatcher {
w := &ResourceWatcher{
version: 1,
typeURL: typeURL,
resourceSet: resourceSet,
resourceAccessTimeout: resourceAccessTimeout,
}
w.versionCond = sync... | [
"func",
"NewResourceWatcher",
"(",
"typeURL",
"string",
",",
"resourceSet",
"ResourceSource",
",",
"resourceAccessTimeout",
"time",
".",
"Duration",
")",
"*",
"ResourceWatcher",
"{",
"w",
":=",
"&",
"ResourceWatcher",
"{",
"version",
":",
"1",
",",
"typeURL",
":... | // NewResourceWatcher creates a new ResourceWatcher backed by the given
// resource set. | [
"NewResourceWatcher",
"creates",
"a",
"new",
"ResourceWatcher",
"backed",
"by",
"the",
"given",
"resource",
"set",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/envoy/xds/watcher.go#L61-L70 |
163,870 | cilium/cilium | pkg/envoy/xds/watcher.go | WatchResources | func (w *ResourceWatcher) WatchResources(ctx context.Context, typeURL string, lastVersion uint64, node *envoy_api_v2_core.Node,
resourceNames []string, out chan<- *VersionedResources) {
defer close(out)
watchLog := log.WithFields(logrus.Fields{
logfields.XDSVersionInfo: lastVersion,
logfields.XDSClientNode: no... | go | func (w *ResourceWatcher) WatchResources(ctx context.Context, typeURL string, lastVersion uint64, node *envoy_api_v2_core.Node,
resourceNames []string, out chan<- *VersionedResources) {
defer close(out)
watchLog := log.WithFields(logrus.Fields{
logfields.XDSVersionInfo: lastVersion,
logfields.XDSClientNode: no... | [
"func",
"(",
"w",
"*",
"ResourceWatcher",
")",
"WatchResources",
"(",
"ctx",
"context",
".",
"Context",
",",
"typeURL",
"string",
",",
"lastVersion",
"uint64",
",",
"node",
"*",
"envoy_api_v2_core",
".",
"Node",
",",
"resourceNames",
"[",
"]",
"string",
",",... | // WatchResources watches for new versions of specific resources and sends them
// into the given out channel.
//
// A call to this method blocks until a version greater than lastVersion is
// available. Therefore, every call must be done in a separate goroutine.
// A watch can be canceled by canceling the given contex... | [
"WatchResources",
"watches",
"for",
"new",
"versions",
"of",
"specific",
"resources",
"and",
"sends",
"them",
"into",
"the",
"given",
"out",
"channel",
".",
"A",
"call",
"to",
"this",
"method",
"blocks",
"until",
"a",
"version",
"greater",
"than",
"lastVersion... | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/envoy/xds/watcher.go#L102-L187 |
163,871 | cilium/cilium | pkg/k8s/apis/cilium.io/v2/zz_generated.deepcopy.go | DeepCopy | func (in *CiliumEndpoint) DeepCopy() *CiliumEndpoint {
if in == nil {
return nil
}
out := new(CiliumEndpoint)
in.DeepCopyInto(out)
return out
} | go | func (in *CiliumEndpoint) DeepCopy() *CiliumEndpoint {
if in == nil {
return nil
}
out := new(CiliumEndpoint)
in.DeepCopyInto(out)
return out
} | [
"func",
"(",
"in",
"*",
"CiliumEndpoint",
")",
"DeepCopy",
"(",
")",
"*",
"CiliumEndpoint",
"{",
"if",
"in",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"out",
":=",
"new",
"(",
"CiliumEndpoint",
")",
"\n",
"in",
".",
"DeepCopyInto",
"(",
"ou... | // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumEndpoint. | [
"DeepCopy",
"is",
"an",
"autogenerated",
"deepcopy",
"function",
"copying",
"the",
"receiver",
"creating",
"a",
"new",
"CiliumEndpoint",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/k8s/apis/cilium.io/v2/zz_generated.deepcopy.go#L36-L43 |
163,872 | cilium/cilium | pkg/k8s/apis/cilium.io/v2/zz_generated.deepcopy.go | DeepCopy | func (in *CiliumEndpointList) DeepCopy() *CiliumEndpointList {
if in == nil {
return nil
}
out := new(CiliumEndpointList)
in.DeepCopyInto(out)
return out
} | go | func (in *CiliumEndpointList) DeepCopy() *CiliumEndpointList {
if in == nil {
return nil
}
out := new(CiliumEndpointList)
in.DeepCopyInto(out)
return out
} | [
"func",
"(",
"in",
"*",
"CiliumEndpointList",
")",
"DeepCopy",
"(",
")",
"*",
"CiliumEndpointList",
"{",
"if",
"in",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"out",
":=",
"new",
"(",
"CiliumEndpointList",
")",
"\n",
"in",
".",
"DeepCopyInto",
... | // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumEndpointList. | [
"DeepCopy",
"is",
"an",
"autogenerated",
"deepcopy",
"function",
"copying",
"the",
"receiver",
"creating",
"a",
"new",
"CiliumEndpointList",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/k8s/apis/cilium.io/v2/zz_generated.deepcopy.go#L69-L76 |
163,873 | cilium/cilium | pkg/k8s/apis/cilium.io/v2/zz_generated.deepcopy.go | DeepCopy | func (in *CiliumNetworkPolicy) DeepCopy() *CiliumNetworkPolicy {
if in == nil {
return nil
}
out := new(CiliumNetworkPolicy)
in.DeepCopyInto(out)
return out
} | go | func (in *CiliumNetworkPolicy) DeepCopy() *CiliumNetworkPolicy {
if in == nil {
return nil
}
out := new(CiliumNetworkPolicy)
in.DeepCopyInto(out)
return out
} | [
"func",
"(",
"in",
"*",
"CiliumNetworkPolicy",
")",
"DeepCopy",
"(",
")",
"*",
"CiliumNetworkPolicy",
"{",
"if",
"in",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"out",
":=",
"new",
"(",
"CiliumNetworkPolicy",
")",
"\n",
"in",
".",
"DeepCopyInto... | // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumNetworkPolicy. | [
"DeepCopy",
"is",
"an",
"autogenerated",
"deepcopy",
"function",
"copying",
"the",
"receiver",
"creating",
"a",
"new",
"CiliumNetworkPolicy",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/k8s/apis/cilium.io/v2/zz_generated.deepcopy.go#L112-L119 |
163,874 | cilium/cilium | pkg/k8s/apis/cilium.io/v2/zz_generated.deepcopy.go | DeepCopy | func (in *CiliumNetworkPolicyList) DeepCopy() *CiliumNetworkPolicyList {
if in == nil {
return nil
}
out := new(CiliumNetworkPolicyList)
in.DeepCopyInto(out)
return out
} | go | func (in *CiliumNetworkPolicyList) DeepCopy() *CiliumNetworkPolicyList {
if in == nil {
return nil
}
out := new(CiliumNetworkPolicyList)
in.DeepCopyInto(out)
return out
} | [
"func",
"(",
"in",
"*",
"CiliumNetworkPolicyList",
")",
"DeepCopy",
"(",
")",
"*",
"CiliumNetworkPolicyList",
"{",
"if",
"in",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"out",
":=",
"new",
"(",
"CiliumNetworkPolicyList",
")",
"\n",
"in",
".",
"... | // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumNetworkPolicyList. | [
"DeepCopy",
"is",
"an",
"autogenerated",
"deepcopy",
"function",
"copying",
"the",
"receiver",
"creating",
"a",
"new",
"CiliumNetworkPolicyList",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/k8s/apis/cilium.io/v2/zz_generated.deepcopy.go#L145-L152 |
163,875 | cilium/cilium | pkg/k8s/apis/cilium.io/v2/zz_generated.deepcopy.go | DeepCopy | func (in *CiliumNetworkPolicyNodeStatus) DeepCopy() *CiliumNetworkPolicyNodeStatus {
if in == nil {
return nil
}
out := new(CiliumNetworkPolicyNodeStatus)
in.DeepCopyInto(out)
return out
} | go | func (in *CiliumNetworkPolicyNodeStatus) DeepCopy() *CiliumNetworkPolicyNodeStatus {
if in == nil {
return nil
}
out := new(CiliumNetworkPolicyNodeStatus)
in.DeepCopyInto(out)
return out
} | [
"func",
"(",
"in",
"*",
"CiliumNetworkPolicyNodeStatus",
")",
"DeepCopy",
"(",
")",
"*",
"CiliumNetworkPolicyNodeStatus",
"{",
"if",
"in",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"out",
":=",
"new",
"(",
"CiliumNetworkPolicyNodeStatus",
")",
"\n",
... | // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumNetworkPolicyNodeStatus. | [
"DeepCopy",
"is",
"an",
"autogenerated",
"deepcopy",
"function",
"copying",
"the",
"receiver",
"creating",
"a",
"new",
"CiliumNetworkPolicyNodeStatus",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/k8s/apis/cilium.io/v2/zz_generated.deepcopy.go#L177-L184 |
163,876 | cilium/cilium | pkg/k8s/apis/cilium.io/v2/zz_generated.deepcopy.go | DeepCopy | func (in *CiliumNetworkPolicyStatus) DeepCopy() *CiliumNetworkPolicyStatus {
if in == nil {
return nil
}
out := new(CiliumNetworkPolicyStatus)
in.DeepCopyInto(out)
return out
} | go | func (in *CiliumNetworkPolicyStatus) DeepCopy() *CiliumNetworkPolicyStatus {
if in == nil {
return nil
}
out := new(CiliumNetworkPolicyStatus)
in.DeepCopyInto(out)
return out
} | [
"func",
"(",
"in",
"*",
"CiliumNetworkPolicyStatus",
")",
"DeepCopy",
"(",
")",
"*",
"CiliumNetworkPolicyStatus",
"{",
"if",
"in",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"out",
":=",
"new",
"(",
"CiliumNetworkPolicyStatus",
")",
"\n",
"in",
".... | // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CiliumNetworkPolicyStatus. | [
"DeepCopy",
"is",
"an",
"autogenerated",
"deepcopy",
"function",
"copying",
"the",
"receiver",
"creating",
"a",
"new",
"CiliumNetworkPolicyStatus",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/k8s/apis/cilium.io/v2/zz_generated.deepcopy.go#L207-L214 |
163,877 | cilium/cilium | pkg/monitor/types.go | GetAllTypes | func GetAllTypes() []string {
types := make([]string, len(monitorAPI.MessageTypeNames))
i := 0
for k := range monitorAPI.MessageTypeNames {
types[i] = k
i++
}
sort.Strings(types)
return types
} | go | func GetAllTypes() []string {
types := make([]string, len(monitorAPI.MessageTypeNames))
i := 0
for k := range monitorAPI.MessageTypeNames {
types[i] = k
i++
}
sort.Strings(types)
return types
} | [
"func",
"GetAllTypes",
"(",
")",
"[",
"]",
"string",
"{",
"types",
":=",
"make",
"(",
"[",
"]",
"string",
",",
"len",
"(",
"monitorAPI",
".",
"MessageTypeNames",
")",
")",
"\n",
"i",
":=",
"0",
"\n",
"for",
"k",
":=",
"range",
"monitorAPI",
".",
"M... | // GetAllTypes returns a slice of all known message types, sorted | [
"GetAllTypes",
"returns",
"a",
"slice",
"of",
"all",
"known",
"message",
"types",
"sorted"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/monitor/types.go#L28-L37 |
163,878 | cilium/cilium | pkg/netns/netns.go | RemoveIfFromNetNSIfExists | func RemoveIfFromNetNSIfExists(netNS ns.NetNS, ifName string) error {
return netNS.Do(func(_ ns.NetNS) error {
l, err := netlink.LinkByName(ifName)
if err != nil {
if strings.Contains(err.Error(), "Link not found") {
return nil
}
return err
}
return netlink.LinkDel(l)
})
} | go | func RemoveIfFromNetNSIfExists(netNS ns.NetNS, ifName string) error {
return netNS.Do(func(_ ns.NetNS) error {
l, err := netlink.LinkByName(ifName)
if err != nil {
if strings.Contains(err.Error(), "Link not found") {
return nil
}
return err
}
return netlink.LinkDel(l)
})
} | [
"func",
"RemoveIfFromNetNSIfExists",
"(",
"netNS",
"ns",
".",
"NetNS",
",",
"ifName",
"string",
")",
"error",
"{",
"return",
"netNS",
".",
"Do",
"(",
"func",
"(",
"_",
"ns",
".",
"NetNS",
")",
"error",
"{",
"l",
",",
"err",
":=",
"netlink",
".",
"Lin... | // RemoveIfFromNetNSIfExists removes the given interface from the given
// network namespace.
//
// If the interface does not exist, no error will be returned. | [
"RemoveIfFromNetNSIfExists",
"removes",
"the",
"given",
"interface",
"from",
"the",
"given",
"network",
"namespace",
".",
"If",
"the",
"interface",
"does",
"not",
"exist",
"no",
"error",
"will",
"be",
"returned",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/netns/netns.go#L32-L43 |
163,879 | cilium/cilium | pkg/netns/netns.go | ListNamedNetNSWithPrefix | func ListNamedNetNSWithPrefix(prefix string) ([]string, error) {
entries, err := ioutil.ReadDir(netNSRootDir())
if err != nil {
return nil, err
}
ns := make([]string, 0)
for _, e := range entries {
if !e.IsDir() && strings.HasPrefix(e.Name(), prefix) {
ns = append(ns, e.Name())
}
}
return ns, nil
} | go | func ListNamedNetNSWithPrefix(prefix string) ([]string, error) {
entries, err := ioutil.ReadDir(netNSRootDir())
if err != nil {
return nil, err
}
ns := make([]string, 0)
for _, e := range entries {
if !e.IsDir() && strings.HasPrefix(e.Name(), prefix) {
ns = append(ns, e.Name())
}
}
return ns, nil
} | [
"func",
"ListNamedNetNSWithPrefix",
"(",
"prefix",
"string",
")",
"(",
"[",
"]",
"string",
",",
"error",
")",
"{",
"entries",
",",
"err",
":=",
"ioutil",
".",
"ReadDir",
"(",
"netNSRootDir",
"(",
")",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",... | // ListNamedNetNSWithPrefix returns list of named network namespaces which name
// starts with the given prefix. | [
"ListNamedNetNSWithPrefix",
"returns",
"list",
"of",
"named",
"network",
"namespaces",
"which",
"name",
"starts",
"with",
"the",
"given",
"prefix",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/netns/netns.go#L84-L98 |
163,880 | cilium/cilium | pkg/kvstore/config.go | setOpts | func setOpts(opts map[string]string, supportedOpts backendOptions) error {
errors := 0
for key, val := range opts {
opt, ok := supportedOpts[key]
if !ok {
errors++
log.WithField(logfields.Key, key).Error("unknown kvstore configuration key")
continue
}
if opt.validate != nil {
if err := opt.valid... | go | func setOpts(opts map[string]string, supportedOpts backendOptions) error {
errors := 0
for key, val := range opts {
opt, ok := supportedOpts[key]
if !ok {
errors++
log.WithField(logfields.Key, key).Error("unknown kvstore configuration key")
continue
}
if opt.validate != nil {
if err := opt.valid... | [
"func",
"setOpts",
"(",
"opts",
"map",
"[",
"string",
"]",
"string",
",",
"supportedOpts",
"backendOptions",
")",
"error",
"{",
"errors",
":=",
"0",
"\n\n",
"for",
"key",
",",
"val",
":=",
"range",
"opts",
"{",
"opt",
",",
"ok",
":=",
"supportedOpts",
... | // setOpts validates the specified options against the selected backend and
// then modifies the configuration | [
"setOpts",
"validates",
"the",
"specified",
"options",
"against",
"the",
"selected",
"backend",
"and",
"then",
"modifies",
"the",
"configuration"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/kvstore/config.go#L31-L68 |
163,881 | cilium/cilium | pkg/kvstore/config.go | Setup | func Setup(selectedBackend string, opts map[string]string, goOpts *ExtraOptions) error {
var err error
setupOnce.Do(func() {
err = setup(selectedBackend, opts, goOpts)
})
return err
} | go | func Setup(selectedBackend string, opts map[string]string, goOpts *ExtraOptions) error {
var err error
setupOnce.Do(func() {
err = setup(selectedBackend, opts, goOpts)
})
return err
} | [
"func",
"Setup",
"(",
"selectedBackend",
"string",
",",
"opts",
"map",
"[",
"string",
"]",
"string",
",",
"goOpts",
"*",
"ExtraOptions",
")",
"error",
"{",
"var",
"err",
"error",
"\n\n",
"setupOnce",
".",
"Do",
"(",
"func",
"(",
")",
"{",
"err",
"=",
... | // Setup sets up the key-value store specified in kvStore and configures it
// with the options provided in opts | [
"Setup",
"sets",
"up",
"the",
"key",
"-",
"value",
"store",
"specified",
"in",
"kvStore",
"and",
"configures",
"it",
"with",
"the",
"options",
"provided",
"in",
"opts"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/kvstore/config.go#L105-L113 |
163,882 | cilium/cilium | pkg/maps/lbmap/ipv6.go | ToHost | func (k *Service6Key) ToHost() ServiceKey {
n := *k
n.Port = byteorder.NetworkToHost(n.Port).(uint16)
return &n
} | go | func (k *Service6Key) ToHost() ServiceKey {
n := *k
n.Port = byteorder.NetworkToHost(n.Port).(uint16)
return &n
} | [
"func",
"(",
"k",
"*",
"Service6Key",
")",
"ToHost",
"(",
")",
"ServiceKey",
"{",
"n",
":=",
"*",
"k",
"\n",
"n",
".",
"Port",
"=",
"byteorder",
".",
"NetworkToHost",
"(",
"n",
".",
"Port",
")",
".",
"(",
"uint16",
")",
"\n",
"return",
"&",
"n",
... | // ToHost converts Service6Key to host byte order. | [
"ToHost",
"converts",
"Service6Key",
"to",
"host",
"byte",
"order",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/maps/lbmap/ipv6.go#L165-L169 |
163,883 | cilium/cilium | pkg/maps/lbmap/ipv6.go | ToNetwork | func (s *Service6Value) ToNetwork() ServiceValue {
n := *s
n.RevNat = byteorder.HostToNetwork(n.RevNat).(uint16)
n.Port = byteorder.HostToNetwork(n.Port).(uint16)
n.Weight = byteorder.HostToNetwork(n.Weight).(uint16)
return &n
} | go | func (s *Service6Value) ToNetwork() ServiceValue {
n := *s
n.RevNat = byteorder.HostToNetwork(n.RevNat).(uint16)
n.Port = byteorder.HostToNetwork(n.Port).(uint16)
n.Weight = byteorder.HostToNetwork(n.Weight).(uint16)
return &n
} | [
"func",
"(",
"s",
"*",
"Service6Value",
")",
"ToNetwork",
"(",
")",
"ServiceValue",
"{",
"n",
":=",
"*",
"s",
"\n",
"n",
".",
"RevNat",
"=",
"byteorder",
".",
"HostToNetwork",
"(",
"n",
".",
"RevNat",
")",
".",
"(",
"uint16",
")",
"\n",
"n",
".",
... | // ToNetwork converts Service6Value ports to network byte order. | [
"ToNetwork",
"converts",
"Service6Value",
"ports",
"to",
"network",
"byte",
"order",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/maps/lbmap/ipv6.go#L225-L231 |
163,884 | cilium/cilium | pkg/maps/lbmap/ipv6.go | ToHost | func (s *Service6Value) ToHost() ServiceValue {
n := *s
n.RevNat = byteorder.NetworkToHost(n.RevNat).(uint16)
n.Port = byteorder.NetworkToHost(n.Port).(uint16)
n.Weight = byteorder.NetworkToHost(n.Weight).(uint16)
return &n
} | go | func (s *Service6Value) ToHost() ServiceValue {
n := *s
n.RevNat = byteorder.NetworkToHost(n.RevNat).(uint16)
n.Port = byteorder.NetworkToHost(n.Port).(uint16)
n.Weight = byteorder.NetworkToHost(n.Weight).(uint16)
return &n
} | [
"func",
"(",
"s",
"*",
"Service6Value",
")",
"ToHost",
"(",
")",
"ServiceValue",
"{",
"n",
":=",
"*",
"s",
"\n",
"n",
".",
"RevNat",
"=",
"byteorder",
".",
"NetworkToHost",
"(",
"n",
".",
"RevNat",
")",
".",
"(",
"uint16",
")",
"\n",
"n",
".",
"P... | // ToHost converts Service6Value ports to host byte order. | [
"ToHost",
"converts",
"Service6Value",
"ports",
"to",
"host",
"byte",
"order",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/maps/lbmap/ipv6.go#L234-L240 |
163,885 | cilium/cilium | pkg/maps/lbmap/ipv6.go | ToNetwork | func (v *RevNat6Key) ToNetwork() RevNatKey {
n := *v
n.Key = byteorder.HostToNetwork(n.Key).(uint16)
return &n
} | go | func (v *RevNat6Key) ToNetwork() RevNatKey {
n := *v
n.Key = byteorder.HostToNetwork(n.Key).(uint16)
return &n
} | [
"func",
"(",
"v",
"*",
"RevNat6Key",
")",
"ToNetwork",
"(",
")",
"RevNatKey",
"{",
"n",
":=",
"*",
"v",
"\n",
"n",
".",
"Key",
"=",
"byteorder",
".",
"HostToNetwork",
"(",
"n",
".",
"Key",
")",
".",
"(",
"uint16",
")",
"\n",
"return",
"&",
"n",
... | // ToNetwork converts RevNat6Key to network byte order. | [
"ToNetwork",
"converts",
"RevNat6Key",
"to",
"network",
"byte",
"order",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/maps/lbmap/ipv6.go#L266-L270 |
163,886 | cilium/cilium | proxylib/proxylib.go | Close | func Close(connectionId uint64) {
mutex.Lock()
delete(connections, connectionId)
mutex.Unlock()
} | go | func Close(connectionId uint64) {
mutex.Lock()
delete(connections, connectionId)
mutex.Unlock()
} | [
"func",
"Close",
"(",
"connectionId",
"uint64",
")",
"{",
"mutex",
".",
"Lock",
"(",
")",
"\n",
"delete",
"(",
"connections",
",",
"connectionId",
")",
"\n",
"mutex",
".",
"Unlock",
"(",
")",
"\n",
"}"
] | // Make this more general connection event callback
//export Close | [
"Make",
"this",
"more",
"general",
"connection",
"event",
"callback",
"export",
"Close"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/proxylib/proxylib.go#L112-L116 |
163,887 | cilium/cilium | proxylib/proxylib.go | OpenModule | func OpenModule(params [][2]string, debug bool) uint64 {
var accessLogPath, xdsPath, nodeID string
for i := range params {
key := params[i][0]
value := strcpy(params[i][1])
switch key {
case "access-log-path":
accessLogPath = value
case "xds-path":
xdsPath = value
case "node-id":
nodeID = value
... | go | func OpenModule(params [][2]string, debug bool) uint64 {
var accessLogPath, xdsPath, nodeID string
for i := range params {
key := params[i][0]
value := strcpy(params[i][1])
switch key {
case "access-log-path":
accessLogPath = value
case "xds-path":
xdsPath = value
case "node-id":
nodeID = value
... | [
"func",
"OpenModule",
"(",
"params",
"[",
"]",
"[",
"2",
"]",
"string",
",",
"debug",
"bool",
")",
"uint64",
"{",
"var",
"accessLogPath",
",",
"xdsPath",
",",
"nodeID",
"string",
"\n",
"for",
"i",
":=",
"range",
"params",
"{",
"key",
":=",
"params",
... | // OpenModule is called before any other APIs.
// Called concurrently by different filter instances.
// Returns a library instance ID that must be passed to all other API calls.
// Calls with the same parameters will return the same instance.
// Zero return value indicates an error.
//export OpenModule | [
"OpenModule",
"is",
"called",
"before",
"any",
"other",
"APIs",
".",
"Called",
"concurrently",
"by",
"different",
"filter",
"instances",
".",
"Returns",
"a",
"library",
"instance",
"ID",
"that",
"must",
"be",
"passed",
"to",
"all",
"other",
"API",
"calls",
"... | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/proxylib/proxylib.go#L124-L150 |
163,888 | cilium/cilium | pkg/maps/lbmap/ipv4.go | ToNetwork | func (k *Service4Key) ToNetwork() ServiceKey {
n := *k
n.Port = byteorder.HostToNetwork(n.Port).(uint16)
return &n
} | go | func (k *Service4Key) ToNetwork() ServiceKey {
n := *k
n.Port = byteorder.HostToNetwork(n.Port).(uint16)
return &n
} | [
"func",
"(",
"k",
"*",
"Service4Key",
")",
"ToNetwork",
"(",
")",
"ServiceKey",
"{",
"n",
":=",
"*",
"k",
"\n",
"n",
".",
"Port",
"=",
"byteorder",
".",
"HostToNetwork",
"(",
"n",
".",
"Port",
")",
".",
"(",
"uint16",
")",
"\n",
"return",
"&",
"n... | // ToNetwork converts Service4Key port to network byte order. | [
"ToNetwork",
"converts",
"Service4Key",
"port",
"to",
"network",
"byte",
"order",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/maps/lbmap/ipv4.go#L147-L151 |
163,889 | cilium/cilium | pkg/maps/lbmap/ipv4.go | ToNetwork | func (k *RevNat4Key) ToNetwork() RevNatKey {
n := *k
n.Key = byteorder.HostToNetwork(n.Key).(uint16)
return &n
} | go | func (k *RevNat4Key) ToNetwork() RevNatKey {
n := *k
n.Key = byteorder.HostToNetwork(n.Key).(uint16)
return &n
} | [
"func",
"(",
"k",
"*",
"RevNat4Key",
")",
"ToNetwork",
"(",
")",
"RevNatKey",
"{",
"n",
":=",
"*",
"k",
"\n",
"n",
".",
"Key",
"=",
"byteorder",
".",
"HostToNetwork",
"(",
"n",
".",
"Key",
")",
".",
"(",
"uint16",
")",
"\n",
"return",
"&",
"n",
... | // ToNetwork converts RevNat4Key to network byte order. | [
"ToNetwork",
"converts",
"RevNat4Key",
"to",
"network",
"byte",
"order",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/maps/lbmap/ipv4.go#L269-L273 |
163,890 | cilium/cilium | pkg/maps/lbmap/ipv4.go | ToNetwork | func (v *RevNat4Value) ToNetwork() RevNatValue {
n := *v
n.Port = byteorder.HostToNetwork(n.Port).(uint16)
return &n
} | go | func (v *RevNat4Value) ToNetwork() RevNatValue {
n := *v
n.Port = byteorder.HostToNetwork(n.Port).(uint16)
return &n
} | [
"func",
"(",
"v",
"*",
"RevNat4Value",
")",
"ToNetwork",
"(",
")",
"RevNatValue",
"{",
"n",
":=",
"*",
"v",
"\n",
"n",
".",
"Port",
"=",
"byteorder",
".",
"HostToNetwork",
"(",
"n",
".",
"Port",
")",
".",
"(",
"uint16",
")",
"\n",
"return",
"&",
... | // ToNetwork converts RevNat4Value to network byte order. | [
"ToNetwork",
"converts",
"RevNat4Value",
"to",
"network",
"byte",
"order",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/maps/lbmap/ipv4.go#L283-L287 |
163,891 | cilium/cilium | api/v1/server/restapi/service/get_service.go | NewGetService | func NewGetService(ctx *middleware.Context, handler GetServiceHandler) *GetService {
return &GetService{Context: ctx, Handler: handler}
} | go | func NewGetService(ctx *middleware.Context, handler GetServiceHandler) *GetService {
return &GetService{Context: ctx, Handler: handler}
} | [
"func",
"NewGetService",
"(",
"ctx",
"*",
"middleware",
".",
"Context",
",",
"handler",
"GetServiceHandler",
")",
"*",
"GetService",
"{",
"return",
"&",
"GetService",
"{",
"Context",
":",
"ctx",
",",
"Handler",
":",
"handler",
"}",
"\n",
"}"
] | // NewGetService creates a new http.Handler for the get service operation | [
"NewGetService",
"creates",
"a",
"new",
"http",
".",
"Handler",
"for",
"the",
"get",
"service",
"operation"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/server/restapi/service/get_service.go#L28-L30 |
163,892 | cilium/cilium | api/v1/server/restapi/ipam/post_ip_a_m_ip.go | NewPostIPAMIP | func NewPostIPAMIP(ctx *middleware.Context, handler PostIPAMIPHandler) *PostIPAMIP {
return &PostIPAMIP{Context: ctx, Handler: handler}
} | go | func NewPostIPAMIP(ctx *middleware.Context, handler PostIPAMIPHandler) *PostIPAMIP {
return &PostIPAMIP{Context: ctx, Handler: handler}
} | [
"func",
"NewPostIPAMIP",
"(",
"ctx",
"*",
"middleware",
".",
"Context",
",",
"handler",
"PostIPAMIPHandler",
")",
"*",
"PostIPAMIP",
"{",
"return",
"&",
"PostIPAMIP",
"{",
"Context",
":",
"ctx",
",",
"Handler",
":",
"handler",
"}",
"\n",
"}"
] | // NewPostIPAMIP creates a new http.Handler for the post IP a m IP operation | [
"NewPostIPAMIP",
"creates",
"a",
"new",
"http",
".",
"Handler",
"for",
"the",
"post",
"IP",
"a",
"m",
"IP",
"operation"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/server/restapi/ipam/post_ip_a_m_ip.go#L28-L30 |
163,893 | cilium/cilium | api/v1/health/client/connectivity/get_status_parameters.go | WithTimeout | func (o *GetStatusParams) WithTimeout(timeout time.Duration) *GetStatusParams {
o.SetTimeout(timeout)
return o
} | go | func (o *GetStatusParams) WithTimeout(timeout time.Duration) *GetStatusParams {
o.SetTimeout(timeout)
return o
} | [
"func",
"(",
"o",
"*",
"GetStatusParams",
")",
"WithTimeout",
"(",
"timeout",
"time",
".",
"Duration",
")",
"*",
"GetStatusParams",
"{",
"o",
".",
"SetTimeout",
"(",
"timeout",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithTimeout adds the timeout to the get status params | [
"WithTimeout",
"adds",
"the",
"timeout",
"to",
"the",
"get",
"status",
"params"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/health/client/connectivity/get_status_parameters.go#L69-L72 |
163,894 | cilium/cilium | api/v1/health/client/connectivity/get_status_parameters.go | WithContext | func (o *GetStatusParams) WithContext(ctx context.Context) *GetStatusParams {
o.SetContext(ctx)
return o
} | go | func (o *GetStatusParams) WithContext(ctx context.Context) *GetStatusParams {
o.SetContext(ctx)
return o
} | [
"func",
"(",
"o",
"*",
"GetStatusParams",
")",
"WithContext",
"(",
"ctx",
"context",
".",
"Context",
")",
"*",
"GetStatusParams",
"{",
"o",
".",
"SetContext",
"(",
"ctx",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithContext adds the context to the get status params | [
"WithContext",
"adds",
"the",
"context",
"to",
"the",
"get",
"status",
"params"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/health/client/connectivity/get_status_parameters.go#L80-L83 |
163,895 | cilium/cilium | api/v1/health/client/connectivity/get_status_parameters.go | WithHTTPClient | func (o *GetStatusParams) WithHTTPClient(client *http.Client) *GetStatusParams {
o.SetHTTPClient(client)
return o
} | go | func (o *GetStatusParams) WithHTTPClient(client *http.Client) *GetStatusParams {
o.SetHTTPClient(client)
return o
} | [
"func",
"(",
"o",
"*",
"GetStatusParams",
")",
"WithHTTPClient",
"(",
"client",
"*",
"http",
".",
"Client",
")",
"*",
"GetStatusParams",
"{",
"o",
".",
"SetHTTPClient",
"(",
"client",
")",
"\n",
"return",
"o",
"\n",
"}"
] | // WithHTTPClient adds the HTTPClient to the get status params | [
"WithHTTPClient",
"adds",
"the",
"HTTPClient",
"to",
"the",
"get",
"status",
"params"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/health/client/connectivity/get_status_parameters.go#L91-L94 |
163,896 | cilium/cilium | api/v1/server/restapi/prefilter/get_prefilter_responses.go | WithPayload | func (o *GetPrefilterOK) WithPayload(payload *models.Prefilter) *GetPrefilterOK {
o.Payload = payload
return o
} | go | func (o *GetPrefilterOK) WithPayload(payload *models.Prefilter) *GetPrefilterOK {
o.Payload = payload
return o
} | [
"func",
"(",
"o",
"*",
"GetPrefilterOK",
")",
"WithPayload",
"(",
"payload",
"*",
"models",
".",
"Prefilter",
")",
"*",
"GetPrefilterOK",
"{",
"o",
".",
"Payload",
"=",
"payload",
"\n",
"return",
"o",
"\n",
"}"
] | // WithPayload adds the payload to the get prefilter o k response | [
"WithPayload",
"adds",
"the",
"payload",
"to",
"the",
"get",
"prefilter",
"o",
"k",
"response"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/server/restapi/prefilter/get_prefilter_responses.go#L38-L41 |
163,897 | cilium/cilium | api/v1/server/restapi/prefilter/get_prefilter_responses.go | WithPayload | func (o *GetPrefilterFailure) WithPayload(payload models.Error) *GetPrefilterFailure {
o.Payload = payload
return o
} | go | func (o *GetPrefilterFailure) WithPayload(payload models.Error) *GetPrefilterFailure {
o.Payload = payload
return o
} | [
"func",
"(",
"o",
"*",
"GetPrefilterFailure",
")",
"WithPayload",
"(",
"payload",
"models",
".",
"Error",
")",
"*",
"GetPrefilterFailure",
"{",
"o",
".",
"Payload",
"=",
"payload",
"\n",
"return",
"o",
"\n",
"}"
] | // WithPayload adds the payload to the get prefilter failure response | [
"WithPayload",
"adds",
"the",
"payload",
"to",
"the",
"get",
"prefilter",
"failure",
"response"
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/api/v1/server/restapi/prefilter/get_prefilter_responses.go#L82-L85 |
163,898 | cilium/cilium | pkg/ipcache/cidr.go | AllocateCIDRs | func AllocateCIDRs(impl Implementation, prefixes []*net.IPNet) error {
// First, if the implementation will complain, exit early.
if err := checkPrefixes(impl, prefixes); err != nil {
return err
}
// maintain list of used identities to undo on error
usedIdentities := []*identity.Identity{}
// maintain list of... | go | func AllocateCIDRs(impl Implementation, prefixes []*net.IPNet) error {
// First, if the implementation will complain, exit early.
if err := checkPrefixes(impl, prefixes); err != nil {
return err
}
// maintain list of used identities to undo on error
usedIdentities := []*identity.Identity{}
// maintain list of... | [
"func",
"AllocateCIDRs",
"(",
"impl",
"Implementation",
",",
"prefixes",
"[",
"]",
"*",
"net",
".",
"IPNet",
")",
"error",
"{",
"// First, if the implementation will complain, exit early.",
"if",
"err",
":=",
"checkPrefixes",
"(",
"impl",
",",
"prefixes",
")",
";"... | // AllocateCIDRs attempts to allocate identities for a list of CIDRs. If any
// allocation fails, all allocations are rolled back and the error is returned.
// When an identity is freshly allocated for a CIDR, it is added to the
// ipcache. | [
"AllocateCIDRs",
"attempts",
"to",
"allocate",
"identities",
"for",
"a",
"list",
"of",
"CIDRs",
".",
"If",
"any",
"allocation",
"fails",
"all",
"allocations",
"are",
"rolled",
"back",
"and",
"the",
"error",
"is",
"returned",
".",
"When",
"an",
"identity",
"i... | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/ipcache/cidr.go#L32-L71 |
163,899 | cilium/cilium | pkg/ipcache/cidr.go | ReleaseCIDRs | func ReleaseCIDRs(prefixes []*net.IPNet) {
for _, prefix := range prefixes {
if prefix == nil {
continue
}
if id := cache.LookupIdentity(cidr.GetCIDRLabels(prefix)); id != nil {
released, err := cache.Release(context.Background(), id)
if err != nil {
log.WithError(err).Warningf("Unable to release i... | go | func ReleaseCIDRs(prefixes []*net.IPNet) {
for _, prefix := range prefixes {
if prefix == nil {
continue
}
if id := cache.LookupIdentity(cidr.GetCIDRLabels(prefix)); id != nil {
released, err := cache.Release(context.Background(), id)
if err != nil {
log.WithError(err).Warningf("Unable to release i... | [
"func",
"ReleaseCIDRs",
"(",
"prefixes",
"[",
"]",
"*",
"net",
".",
"IPNet",
")",
"{",
"for",
"_",
",",
"prefix",
":=",
"range",
"prefixes",
"{",
"if",
"prefix",
"==",
"nil",
"{",
"continue",
"\n",
"}",
"\n\n",
"if",
"id",
":=",
"cache",
".",
"Look... | // ReleaseCIDRs releases the identities of a list of CIDRs. When the last use
// of the identity is released, the ipcache entry is deleted. | [
"ReleaseCIDRs",
"releases",
"the",
"identities",
"of",
"a",
"list",
"of",
"CIDRs",
".",
"When",
"the",
"last",
"use",
"of",
"the",
"identity",
"is",
"released",
"the",
"ipcache",
"entry",
"is",
"deleted",
"."
] | 6ecfff82c2314dd9d847645361b57e2646eed64b | https://github.com/cilium/cilium/blob/6ecfff82c2314dd9d847645361b57e2646eed64b/pkg/ipcache/cidr.go#L75-L94 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.