_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c163700
train
// ParseServiceID parses a Kubernetes service and returns the ServiceID
{ "resource": "" }
c163701
train
// ParseService parses a Kubernetes service and returns a Service
{ "resource": "" }
c163702
train
// String returns the string representation of a service ID
{ "resource": "" }
c163703
train
// ParseServiceIDFrom returns a ServiceID derived from the given kubernetes // service FQDN.
{ "resource": "" }
c163704
train
// String returns the string representation of a service resource
{ "resource": "" }
c163705
train
// DeepEquals returns true if both services are equal
{ "resource": "" }
c163706
train
// NewService returns a new Service with the Ports map initialized.
{ "resource": "" }
c163707
train
// UniquePorts returns a map of all unique ports configured in the service
{ "resource": "" }
c163708
train
// NewClusterService returns the service.ClusterService representing a // Kubernetes Service
{ "resource": "" }
c163709
train
// DeepEquals returns true if both PortConfigurations are identical
{ "resource": "" }
c163710
train
// GetKeyName returns the kvstore key to be used for the global service
{ "resource": "" }
c163711
train
// Unmarshal parses the JSON byte slice and updates the global service receiver
{ "resource": "" }
c163712
train
// NewClusterService returns a new cluster service definition
{ "resource": "" }
c163713
train
// List takes label and field selectors, and returns the list of CiliumEndpoints that match those selectors.
{ "resource": "" }
c163714
train
// Watch returns a watch.Interface that watches the requested ciliumEndpoints.
{ "resource": "" }
c163715
train
// Delete takes name of the ciliumEndpoint and deletes it. Returns an error if one occurs.
{ "resource": "" }
c163716
train
// getUUIDFromRuleLabels returns the value of the UUID label
{ "resource": "" }
c163717
train
// generateUUIDLabel builds a random UUID label that can be used to uniquely identify // rules augmented with a "toCIDRSet" based on "toFQDNs".
{ "resource": "" }
c163718
train
// stripToCIDRSet ensures no ToCIDRSet is nil when ToFQDNs is non-nil
{ "resource": "" }
c163719
train
// hasToFQDN indicates whether a ToFQDN rule exists in the api.Rule
{ "resource": "" }
c163720
train
// sortedIPsAreEqual compares two lists of sorted IPs. If any differ it returns // false.
{ "resource": "" }
c163721
train
// KeepUniqueNames it gets a array of strings and return a new array of strings // with the unique names.
{ "resource": "" }
c163722
train
// Sanitize validates and sanitizes a policy rule. Minor edits such as // capitalization of the protocol name are automatically fixed up. More // fundamental violations will cause an error to be returned.
{ "resource": "" }
c163723
train
// sanitize validates a CIDRRule by checking that the CIDR prefix itself is // valid, and ensuring that all of the exception CIDR prefixes are contained // within the allowed CIDR prefix.
{ "resource": "" }
c163724
train
// Validate validates this node status
{ "resource": "" }
c163725
train
// Validate validates this endpoint configuration status
{ "resource": "" }
c163726
train
// WithPayload adds the payload to the delete Ip a m Ip failure response
{ "resource": "" }
c163727
train
// DumpInfo dumps an agent notification
{ "resource": "" }
c163728
train
// PolicyUpdateRepr returns string representation of monitor notification
{ "resource": "" }
c163729
train
// PolicyDeleteRepr returns string representation of monitor notification
{ "resource": "" }
c163730
train
// EndpointRegenRepr returns string representation of monitor notification
{ "resource": "" }
c163731
train
// TimeRepr returns string representation of monitor notification
{ "resource": "" }
c163732
train
// NewMockStream creates a new mock Stream for testing.
{ "resource": "" }
c163733
train
// lookupRedirectPort returns the redirect L4 proxy port for the given L4 // policy map key, in host byte order. Returns 0 if not found or the // filter doesn't require a redirect. // Must be called with Endpoint.Mutex held.
{ "resource": "" }
c163734
train
// Note that this function assumes that endpoint policy has already been generated! // must be called with endpoint.Mutex held for reading
{ "resource": "" }
c163735
train
// setNextPolicyRevision updates the desired policy revision field // Must be called with the endpoint lock held for at least reading
{ "resource": "" }
c163736
train
// updateAndOverrideEndpointOptions updates the boolean configuration options for the endpoint // based off of policy configuration, daemon policy enforcement mode, and any // configuration options provided in opts. Returns whether the options changed // from prior endpoint configuration. Note that the policy which app...
{ "resource": "" }
c163737
train
// updateRealizedState sets any realized state fields within the endpoint to // be the desired state of the endpoint. This is only called after a successful // regeneration of the endpoint.
{ "resource": "" }
c163738
train
// Regenerate forces the regeneration of endpoint programs & policy // Should only be called with e.state == StateWaitingToRegenerate or with // e.state == StateWaitingForIdentity
{ "resource": "" }
c163739
train
// This synchronizes the key-value store with a mapping of the endpoint's IP // with the numerical ID representing its security identity.
{ "resource": "" }
c163740
train
// SetIdentity resets endpoint's policy identity to 'id'. // Caller triggers policy regeneration if needed. // Called with e.Mutex Locked
{ "resource": "" }
c163741
train
// GetCIDRPrefixLengths returns the sorted list of unique prefix lengths used // for CIDR policy or IPcache lookup from this endpoint.
{ "resource": "" }
c163742
train
// NewNodeDiscovery returns a pointer to new node discovery object
{ "resource": "" }
c163743
train
// start configures the local node and starts node discovery. This is called on // agent startup to configure the local node based on the configuration options // passed to the agent. nodeName is the name to be used in the local agent.
{ "resource": "" }
c163744
train
// InitializeDefaultLogger returns a logrus Logger with a custom text formatter.
{ "resource": "" }
c163745
train
// SetupLogging sets up each logging service provided in loggers and configures // each logger with the provided logOpts.
{ "resource": "" }
c163746
train
// setupSyslog sets up and configures syslog with the provided options in // logOpts. If some options are not provided, sensible defaults are used.
{ "resource": "" }
c163747
train
// setupFormatter sets up the text formatting for logs output by logrus.
{ "resource": "" }
c163748
train
// validateOpts iterates through all of the keys in logOpts, and errors out if // the key in logOpts is not a key in supportedOpts.
{ "resource": "" }
c163749
train
// getLogDriverConfig returns a map containing the key-value pairs that start // with string logDriver from map logOpts.
{ "resource": "" }
c163750
train
// MultiLine breaks a multi line text into individual log entries and calls the // logging function to log each entry
{ "resource": "" }
c163751
train
// CanLogAt returns whether a log message at the given level would be // logged by the given logger.
{ "resource": "" }
c163752
train
// GetLevel returns the log level of the given logger.
{ "resource": "" }
c163753
train
// WithPayload adds the payload to the get fqdn cache o k response
{ "resource": "" }
c163754
train
// WithPayload adds the payload to the get fqdn cache bad request response
{ "resource": "" }
c163755
train
// Validate validates this status response
{ "resource": "" }
c163756
train
// Validate validates this status response cluster nodes items0 primary address
{ "resource": "" }
c163757
train
// Validate validates this status response controllers items0 configuration
{ "resource": "" }
c163758
train
// Validate validates this status response controllers items0 status
{ "resource": "" }
c163759
train
// Validate validates this status response kubernetes
{ "resource": "" }
c163760
train
// WithTimeout adds the timeout to the get endpoint ID params
{ "resource": "" }
c163761
train
// WithContext adds the context to the get endpoint ID params
{ "resource": "" }
c163762
train
// WithHTTPClient adds the HTTPClient to the get endpoint ID params
{ "resource": "" }
c163763
train
// WithID adds the id to the get endpoint ID params
{ "resource": "" }
c163764
train
// WithTimeout adds the timeout to the get service params
{ "resource": "" }
c163765
train
// WithContext adds the context to the get service params
{ "resource": "" }
c163766
train
// WithHTTPClient adds the HTTPClient to the get service params
{ "resource": "" }
c163767
train
// WithPayload adds the payload to the put policy o k response
{ "resource": "" }
c163768
train
// WithPayload adds the payload to the put policy invalid policy response
{ "resource": "" }
c163769
train
// WithPayload adds the payload to the put policy invalid path response
{ "resource": "" }
c163770
train
// WithPayload adds the payload to the put policy failure response
{ "resource": "" }
c163771
train
// bindMatchpattern binds and validates parameter Matchpattern from query.
{ "resource": "" }
c163772
train
// newEndpointKey return a new key from the IP address.
{ "resource": "" }
c163773
train
// WriteEndpoint writes the policy map file descriptor into the map so that // the datapath side can do a lookup from EndpointKey->PolicyMap. Locking is // handled in the usual way via Map lock. If sockops is disabled this will be // a nop.
{ "resource": "" }
c163774
train
// Validate validates this daemon configuration status
{ "resource": "" }
c163775
train
// Validate validates this endpoint networking
{ "resource": "" }
c163776
train
// WithPayload adds the payload to the get metrics o k response
{ "resource": "" }
c163777
train
// Sort is an internal utility to return all LabelArrays in sorted // order, when the source material may be unsorted. 'ls' is sorted // in-place, but also returns the sorted array for convenience.
{ "resource": "" }
c163778
train
// ParseLabelArray parses a list of labels and returns a LabelArray
{ "resource": "" }
c163779
train
// ParseSelectLabelArray parses a list of select labels and returns a LabelArray
{ "resource": "" }
c163780
train
// ParseLabelArrayFromArray converts an array of strings as labels and returns a LabelArray
{ "resource": "" }
c163781
train
// ParseSelectLabelArrayFromArray converts an array of strings as select labels and returns a LabelArray
{ "resource": "" }
c163782
train
// Labels returns the LabelArray as Labels
{ "resource": "" }
c163783
train
// Lacks is identical to Contains but returns all missing labels
{ "resource": "" }
c163784
train
// DeepCopy returns a deep copy of the labels.
{ "resource": "" }
c163785
train
// GetModel returns the LabelArray as a string array with fully-qualified labels. // The output is parseable by ParseLabelArrayFromArray
{ "resource": "" }
c163786
train
// NewMonitorFormatter returns a new formatter with default configuration.
{ "resource": "" }
c163787
train
// dropEvents prints out all the received drop notifications.
{ "resource": "" }
c163788
train
// traceEvents prints out all the received trace notifications.
{ "resource": "" }
c163789
train
// debugEvents prints out all the debug messages.
{ "resource": "" }
c163790
train
// captureEvents prints out all the capture messages.
{ "resource": "" }
c163791
train
// logRecordEvents prints out LogRecord events
{ "resource": "" }
c163792
train
// agentEvents prints out agent events
{ "resource": "" }
c163793
train
// FormatSample prints an event from the provided raw data slice to stdout. // // For most monitor event types, 'data' corresponds to the 'data' field in // bpf.PerfEventSample. Exceptions are MessageTypeAccessLog and // MessageTypeAgent.
{ "resource": "" }
c163794
train
// FormatEvent formats an event from the specified payload to stdout. // // Returns true if the event was successfully printed, false otherwise.
{ "resource": "" }
c163795
train
// createDerivativeCNP will return a new CNP based on the given rule.
{ "resource": "" }
c163796
train
// NewPostIPAM creates a new http.Handler for the post IP a m operation
{ "resource": "" }
c163797
train
// NewOplabelsFromModel creates new label from the model.
{ "resource": "" }
c163798
train
// GetLabelsSHA256 returns the SHA256 of the labels associated with the // identity. The SHA is calculated if not already cached.
{ "resource": "" }
c163799
train
// NewIdentityFromLabelArray creates a new identity
{ "resource": "" }