repo
stringclasses
1 value
path
stringlengths
19
155
func_name
stringlengths
1
106
original_string
stringlengths
76
130k
language
stringclasses
1 value
code
stringlengths
76
130k
code_tokens
listlengths
22
32.6k
docstring
stringlengths
13
1.73k
docstring_tokens
listlengths
1
316
sha
stringclasses
1 value
url
stringlengths
114
252
partition
stringclasses
1 value
summary
stringlengths
13
316
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
kubernetes/kubernetes
staging/src/k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator/aggregator.go
buildOpenAPISpec
func (s *specAggregator) buildOpenAPISpec() (specToReturn *spec.Swagger, err error) { specs := []openAPISpecInfo{} for _, specInfo := range s.openAPISpecs { if specInfo.spec == nil { continue } specs = append(specs, *specInfo) } if len(specs) == 0 { return &spec.Swagger{}, nil } sortByPriority(specs) ...
go
func (s *specAggregator) buildOpenAPISpec() (specToReturn *spec.Swagger, err error) { specs := []openAPISpecInfo{} for _, specInfo := range s.openAPISpecs { if specInfo.spec == nil { continue } specs = append(specs, *specInfo) } if len(specs) == 0 { return &spec.Swagger{}, nil } sortByPriority(specs) ...
[ "func", "(", "s", "*", "specAggregator", ")", "buildOpenAPISpec", "(", ")", "(", "specToReturn", "*", "spec", ".", "Swagger", ",", "err", "error", ")", "{", "specs", ":=", "[", "]", "openAPISpecInfo", "{", "}", "\n", "for", "_", ",", "specInfo", ":=", ...
// buildOpenAPISpec aggregates all OpenAPI specs. It is not thread-safe. The caller is responsible to hold proper locks.
[ "buildOpenAPISpec", "aggregates", "all", "OpenAPI", "specs", ".", "It", "is", "not", "thread", "-", "safe", ".", "The", "caller", "is", "responsible", "to", "hold", "proper", "locks", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/kube-aggregator/pkg/controllers/openapi/aggregator/aggregator.go#L159-L185
train
buildOpenAPISpec builds a swagger spec from the openAPISpecs
[ 30522, 4569, 2278, 1006, 1055, 1008, 28699, 8490, 17603, 20697, 2953, 1007, 3857, 26915, 9331, 2483, 5051, 2278, 1006, 1007, 1006, 28699, 19277, 22299, 1008, 28699, 1012, 25430, 27609, 1010, 9413, 2099, 7561, 1007, 1063, 28699, 2015, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/kubemark/controller.go
getNodeTemplate
func (kubemarkController *KubemarkController) getNodeTemplate() (*apiv1.ReplicationController, error) { podName, err := kubemarkController.kubemarkCluster.getHollowNodeName() if err != nil { return nil, err } hollowNodeName, err := kubemarkController.getNodeNameForPod(podName) if err != nil { return nil, err ...
go
func (kubemarkController *KubemarkController) getNodeTemplate() (*apiv1.ReplicationController, error) { podName, err := kubemarkController.kubemarkCluster.getHollowNodeName() if err != nil { return nil, err } hollowNodeName, err := kubemarkController.getNodeNameForPod(podName) if err != nil { return nil, err ...
[ "func", "(", "kubemarkController", "*", "KubemarkController", ")", "getNodeTemplate", "(", ")", "(", "*", "apiv1", ".", "ReplicationController", ",", "error", ")", "{", "podName", ",", "err", ":=", "kubemarkController", ".", "kubemarkCluster", ".", "getHollowNodeN...
// getNodeTemplate returns the template for hollow node replication controllers // by looking for an existing hollow node specification. This requires at least // one kubemark node to be present on startup.
[ "getNodeTemplate", "returns", "the", "template", "for", "hollow", "node", "replication", "controllers", "by", "looking", "for", "an", "existing", "hollow", "node", "specification", ".", "This", "requires", "at", "least", "one", "kubemark", "node", "to", "be", "p...
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/kubemark/controller.go#L310-L334
train
getNodeTemplate returns the node template for the hollow node
[ 30522, 4569, 2278, 1006, 13970, 4783, 10665, 8663, 13181, 10820, 1008, 13970, 4783, 10665, 8663, 13181, 10820, 1007, 2131, 3630, 3207, 18532, 15725, 1006, 1007, 1006, 1008, 17928, 2615, 2487, 1012, 21647, 8663, 13181, 10820, 1010, 7561, 1007,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/controller/replicaset/replica_set.go
enqueueReplicaSetAfter
func (rsc *ReplicaSetController) enqueueReplicaSetAfter(obj interface{}, after time.Duration) { key, err := controller.KeyFunc(obj) if err != nil { utilruntime.HandleError(fmt.Errorf("couldn't get key for object %+v: %v", obj, err)) return } rsc.queue.AddAfter(key, after) }
go
func (rsc *ReplicaSetController) enqueueReplicaSetAfter(obj interface{}, after time.Duration) { key, err := controller.KeyFunc(obj) if err != nil { utilruntime.HandleError(fmt.Errorf("couldn't get key for object %+v: %v", obj, err)) return } rsc.queue.AddAfter(key, after) }
[ "func", "(", "rsc", "*", "ReplicaSetController", ")", "enqueueReplicaSetAfter", "(", "obj", "interface", "{", "}", ",", "after", "time", ".", "Duration", ")", "{", "key", ",", "err", ":=", "controller", ".", "KeyFunc", "(", "obj", ")", "\n", "if", "err",...
// obj could be an *apps.ReplicaSet, or a DeletionFinalStateUnknown marker item.
[ "obj", "could", "be", "an", "*", "apps", ".", "ReplicaSet", "or", "a", "DeletionFinalStateUnknown", "marker", "item", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/controller/replicaset/replica_set.go#L421-L428
train
enqueueReplicaSetAfter adds a new replica set after after
[ 30522, 4569, 2278, 1006, 12667, 2278, 1008, 15059, 13462, 8663, 13181, 10820, 1007, 4372, 4226, 13094, 13699, 19341, 13462, 10354, 3334, 1006, 27885, 3501, 8278, 1063, 1065, 1010, 2044, 2051, 1012, 9367, 1007, 1063, 3145, 1010, 9413, 2099, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/controller/nodelifecycle/scheduler/rate_limited_queue.go
Remove
func (q *RateLimitedTimedQueue) Remove(value string) bool { return q.queue.Remove(value) }
go
func (q *RateLimitedTimedQueue) Remove(value string) bool { return q.queue.Remove(value) }
[ "func", "(", "q", "*", "RateLimitedTimedQueue", ")", "Remove", "(", "value", "string", ")", "bool", "{", "return", "q", ".", "queue", ".", "Remove", "(", "value", ")", "\n", "}" ]
// Remove Node from the Evictor. The Node won't be processed until // added again.
[ "Remove", "Node", "from", "the", "Evictor", ".", "The", "Node", "won", "t", "be", "processed", "until", "added", "again", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/controller/nodelifecycle/scheduler/rate_limited_queue.go#L274-L276
train
Remove removes the value from the queue. Returns true if the value was removed from the queue.
[ 30522, 4569, 2278, 1006, 1053, 1008, 3446, 17960, 17572, 7292, 2094, 4226, 5657, 1007, 6366, 1006, 3643, 5164, 1007, 22017, 2140, 1063, 2709, 1053, 1012, 24240, 1012, 6366, 1006, 3643, 1007, 1065, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/apis/policy/validation/validation.go
validatePSPSupplementalGroup
func validatePSPSupplementalGroup(fldPath *field.Path, groupOptions *policy.SupplementalGroupsStrategyOptions) field.ErrorList { allErrs := field.ErrorList{} supportedRules := sets.NewString( string(policy.SupplementalGroupsStrategyRunAsAny), string(policy.SupplementalGroupsStrategyMayRunAs), string(policy.Sup...
go
func validatePSPSupplementalGroup(fldPath *field.Path, groupOptions *policy.SupplementalGroupsStrategyOptions) field.ErrorList { allErrs := field.ErrorList{} supportedRules := sets.NewString( string(policy.SupplementalGroupsStrategyRunAsAny), string(policy.SupplementalGroupsStrategyMayRunAs), string(policy.Sup...
[ "func", "validatePSPSupplementalGroup", "(", "fldPath", "*", "field", ".", "Path", ",", "groupOptions", "*", "policy", ".", "SupplementalGroupsStrategyOptions", ")", "field", ".", "ErrorList", "{", "allErrs", ":=", "field", ".", "ErrorList", "{", "}", "\n\n", "s...
// validatePSPSupplementalGroup validates the SupplementalGroupsStrategyOptions fields of the PodSecurityPolicy.
[ "validatePSPSupplementalGroup", "validates", "the", "SupplementalGroupsStrategyOptions", "fields", "of", "the", "PodSecurityPolicy", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/policy/validation/validation.go#L300-L316
train
validatePSPSupplementalGroup validates the supplied group options.
[ 30522, 4569, 2278, 9398, 3686, 4523, 4523, 6279, 10814, 26901, 17058, 1006, 13109, 18927, 8988, 1008, 2492, 1012, 4130, 1010, 2177, 7361, 9285, 1008, 3343, 1012, 27024, 17058, 4757, 6494, 2618, 6292, 7361, 9285, 1007, 2492, 1012, 7561, 9863...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/kubectl/cmd/create/create_namespace.go
NewCmdCreateNamespace
func NewCmdCreateNamespace(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command { options := &NamespaceOpts{ CreateSubcommandOptions: NewCreateSubcommandOptions(ioStreams), } cmd := &cobra.Command{ Use: "namespace NAME [--dry-run]", DisableFlagsInUseLine: true, Aliases:...
go
func NewCmdCreateNamespace(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command { options := &NamespaceOpts{ CreateSubcommandOptions: NewCreateSubcommandOptions(ioStreams), } cmd := &cobra.Command{ Use: "namespace NAME [--dry-run]", DisableFlagsInUseLine: true, Aliases:...
[ "func", "NewCmdCreateNamespace", "(", "f", "cmdutil", ".", "Factory", ",", "ioStreams", "genericclioptions", ".", "IOStreams", ")", "*", "cobra", ".", "Command", "{", "options", ":=", "&", "NamespaceOpts", "{", "CreateSubcommandOptions", ":", "NewCreateSubcommandOpt...
// NewCmdCreateNamespace is a macro command to create a new namespace
[ "NewCmdCreateNamespace", "is", "a", "macro", "command", "to", "create", "a", "new", "namespace" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/kubectl/cmd/create/create_namespace.go#L45-L70
train
NewCmdCreateNamespace returns a command to create a new namespace
[ 30522, 4569, 2278, 2047, 27487, 16409, 29313, 18442, 23058, 1006, 1042, 4642, 8566, 3775, 2140, 1012, 4713, 1010, 16380, 25379, 2015, 12391, 20464, 3695, 16790, 2015, 1012, 16380, 25379, 2015, 1007, 1008, 16604, 1012, 3094, 1063, 7047, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/apis/core/zz_generated.deepcopy.go
DeepCopyInto
func (in *NodeSpec) DeepCopyInto(out *NodeSpec) { *out = *in if in.Taints != nil { in, out := &in.Taints, &out.Taints *out = make([]Taint, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.ConfigSource != nil { in, out := &in.ConfigSource, &out.ConfigSource *out = new(NodeCon...
go
func (in *NodeSpec) DeepCopyInto(out *NodeSpec) { *out = *in if in.Taints != nil { in, out := &in.Taints, &out.Taints *out = make([]Taint, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.ConfigSource != nil { in, out := &in.ConfigSource, &out.ConfigSource *out = new(NodeCon...
[ "func", "(", "in", "*", "NodeSpec", ")", "DeepCopyInto", "(", "out", "*", "NodeSpec", ")", "{", "*", "out", "=", "*", "in", "\n", "if", "in", ".", "Taints", "!=", "nil", "{", "in", ",", "out", ":=", "&", "in", ".", "Taints", ",", "&", "out", ...
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
[ "DeepCopyInto", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "writing", "into", "out", ".", "in", "must", "be", "non", "-", "nil", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/core/zz_generated.deepcopy.go#L2468-L2483
train
DeepCopyInto is an autogenerated deepcopy function copying the receiver creating a new NodeSpec.
[ 30522, 4569, 2278, 1006, 1999, 1008, 14164, 5051, 2278, 1007, 2784, 3597, 7685, 18447, 2080, 1006, 2041, 1008, 14164, 5051, 2278, 1007, 1063, 1008, 2041, 1027, 1008, 1999, 2065, 1999, 1012, 13843, 7666, 999, 1027, 9152, 2140, 1063, 1999, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/volume/util/subpath/subpath_nsenter.go
NewNSEnter
func NewNSEnter(mounter mount.Interface, ne *nsenter.Nsenter, rootDir string) Interface { return &subpathNSE{ mounter: mounter, ne: ne, rootDir: rootDir, } }
go
func NewNSEnter(mounter mount.Interface, ne *nsenter.Nsenter, rootDir string) Interface { return &subpathNSE{ mounter: mounter, ne: ne, rootDir: rootDir, } }
[ "func", "NewNSEnter", "(", "mounter", "mount", ".", "Interface", ",", "ne", "*", "nsenter", ".", "Nsenter", ",", "rootDir", "string", ")", "Interface", "{", "return", "&", "subpathNSE", "{", "mounter", ":", "mounter", ",", "ne", ":", "ne", ",", "rootDir"...
// NewNSEnter returns a subpath.Interface that is to be used with the NsenterMounter // It is only valid on Linux systems
[ "NewNSEnter", "returns", "a", "subpath", ".", "Interface", "that", "is", "to", "be", "used", "with", "the", "NsenterMounter", "It", "is", "only", "valid", "on", "Linux", "systems" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/volume/util/subpath/subpath_nsenter.go#L46-L52
train
NewNSEnter returns a new NSE object
[ 30522, 4569, 2278, 2047, 29428, 3334, 1006, 4057, 2121, 4057, 1012, 8278, 1010, 11265, 1008, 24978, 29110, 1012, 24978, 29110, 1010, 7117, 4305, 2099, 5164, 1007, 8278, 1063, 2709, 1004, 4942, 15069, 12325, 1063, 4057, 2121, 1024, 4057, 212...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/controller/history/controller_history.go
Less
func (br byRevision) Less(i, j int) bool { if br[i].Revision == br[j].Revision { if br[j].CreationTimestamp.Equal(&br[i].CreationTimestamp) { return br[i].Name < br[j].Name } return br[j].CreationTimestamp.After(br[i].CreationTimestamp.Time) } return br[i].Revision < br[j].Revision }
go
func (br byRevision) Less(i, j int) bool { if br[i].Revision == br[j].Revision { if br[j].CreationTimestamp.Equal(&br[i].CreationTimestamp) { return br[i].Name < br[j].Name } return br[j].CreationTimestamp.After(br[i].CreationTimestamp.Time) } return br[i].Revision < br[j].Revision }
[ "func", "(", "br", "byRevision", ")", "Less", "(", "i", ",", "j", "int", ")", "bool", "{", "if", "br", "[", "i", "]", ".", "Revision", "==", "br", "[", "j", "]", ".", "Revision", "{", "if", "br", "[", "j", "]", ".", "CreationTimestamp", ".", ...
// Less breaks ties first by creation timestamp, then by name
[ "Less", "breaks", "ties", "first", "by", "creation", "timestamp", "then", "by", "name" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/controller/history/controller_history.go#L155-L163
train
Less returns true if the revision of the element with index i should be less than the revision of the element with index j.
[ 30522, 4569, 2278, 1006, 7987, 2011, 2890, 17084, 1007, 2625, 1006, 1045, 1010, 1046, 20014, 1007, 22017, 2140, 1063, 2065, 7987, 1031, 1045, 1033, 1012, 13921, 1027, 1027, 7987, 1031, 1046, 1033, 1012, 13921, 1063, 2065, 7987, 1031, 1046, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/client-go/tools/record/util/util.go
IsKeyNotFoundError
func IsKeyNotFoundError(err error) bool { statusErr, _ := err.(*errors.StatusError) if statusErr != nil && statusErr.Status().Code == http.StatusNotFound { return true } return false }
go
func IsKeyNotFoundError(err error) bool { statusErr, _ := err.(*errors.StatusError) if statusErr != nil && statusErr.Status().Code == http.StatusNotFound { return true } return false }
[ "func", "IsKeyNotFoundError", "(", "err", "error", ")", "bool", "{", "statusErr", ",", "_", ":=", "err", ".", "(", "*", "errors", ".", "StatusError", ")", "\n\n", "if", "statusErr", "!=", "nil", "&&", "statusErr", ".", "Status", "(", ")", ".", "Code", ...
// IsKeyNotFoundError is utility function that checks if an error is not found error
[ "IsKeyNotFoundError", "is", "utility", "function", "that", "checks", "if", "an", "error", "is", "not", "found", "error" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/client-go/tools/record/util/util.go#L36-L44
train
IsKeyNotFoundError returns true if the error is a key not found error
[ 30522, 4569, 2278, 2003, 14839, 17048, 14876, 20824, 29165, 1006, 9413, 2099, 7561, 1007, 22017, 2140, 1063, 3570, 2121, 2099, 1010, 1035, 1024, 1027, 9413, 2099, 1012, 1006, 1008, 10697, 1012, 3570, 2121, 29165, 1007, 2065, 3570, 2121, 209...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/kubectl/cmd/plugin/plugin.go
uniquePathsList
func uniquePathsList(paths []string) []string { seen := map[string]bool{} newPaths := []string{} for _, p := range paths { if seen[p] { continue } seen[p] = true newPaths = append(newPaths, p) } return newPaths }
go
func uniquePathsList(paths []string) []string { seen := map[string]bool{} newPaths := []string{} for _, p := range paths { if seen[p] { continue } seen[p] = true newPaths = append(newPaths, p) } return newPaths }
[ "func", "uniquePathsList", "(", "paths", "[", "]", "string", ")", "[", "]", "string", "{", "seen", ":=", "map", "[", "string", "]", "bool", "{", "}", "\n", "newPaths", ":=", "[", "]", "string", "{", "}", "\n", "for", "_", ",", "p", ":=", "range",...
// uniquePathsList deduplicates a given slice of strings without // sorting or otherwise altering its order in any way.
[ "uniquePathsList", "deduplicates", "a", "given", "slice", "of", "strings", "without", "sorting", "or", "otherwise", "altering", "its", "order", "in", "any", "way", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/kubectl/cmd/plugin/plugin.go#L254-L265
train
uniquePathsList returns a list of paths that are unique.
[ 30522, 4569, 2278, 4310, 15069, 14540, 2923, 1006, 10425, 1031, 1033, 5164, 1007, 1031, 1033, 5164, 1063, 2464, 1024, 1027, 4949, 1031, 5164, 1033, 22017, 2140, 1063, 1065, 2047, 15069, 2015, 1024, 1027, 1031, 1033, 5164, 1063, 1065, 2005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
cmd/kube-apiserver/app/server.go
Complete
func Complete(s *options.ServerRunOptions) (completedServerRunOptions, error) { var options completedServerRunOptions // set defaults if err := s.GenericServerRunOptions.DefaultAdvertiseAddress(s.SecureServing.SecureServingOptions); err != nil { return options, err } if err := kubeoptions.DefaultAdvertiseAddress...
go
func Complete(s *options.ServerRunOptions) (completedServerRunOptions, error) { var options completedServerRunOptions // set defaults if err := s.GenericServerRunOptions.DefaultAdvertiseAddress(s.SecureServing.SecureServingOptions); err != nil { return options, err } if err := kubeoptions.DefaultAdvertiseAddress...
[ "func", "Complete", "(", "s", "*", "options", ".", "ServerRunOptions", ")", "(", "completedServerRunOptions", ",", "error", ")", "{", "var", "options", "completedServerRunOptions", "\n", "// set defaults", "if", "err", ":=", "s", ".", "GenericServerRunOptions", "....
// Complete set default ServerRunOptions. // Should be called after kube-apiserver flags parsed.
[ "Complete", "set", "default", "ServerRunOptions", ".", "Should", "be", "called", "after", "kube", "-", "apiserver", "flags", "parsed", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/cmd/kube-apiserver/app/server.go#L530-L629
train
Complete sets the default values for the server run options
[ 30522, 4569, 2278, 3143, 1006, 1055, 1008, 7047, 1012, 8241, 15532, 7361, 9285, 1007, 1006, 2949, 8043, 6299, 15532, 7361, 9285, 1010, 7561, 1007, 1063, 13075, 7047, 2949, 8043, 6299, 15532, 7361, 9285, 1013, 1013, 2275, 12398, 2015, 2065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/apis/core/v1/zz_generated.conversion.go
Convert_v1_FCVolumeSource_To_core_FCVolumeSource
func Convert_v1_FCVolumeSource_To_core_FCVolumeSource(in *v1.FCVolumeSource, out *core.FCVolumeSource, s conversion.Scope) error { return autoConvert_v1_FCVolumeSource_To_core_FCVolumeSource(in, out, s) }
go
func Convert_v1_FCVolumeSource_To_core_FCVolumeSource(in *v1.FCVolumeSource, out *core.FCVolumeSource, s conversion.Scope) error { return autoConvert_v1_FCVolumeSource_To_core_FCVolumeSource(in, out, s) }
[ "func", "Convert_v1_FCVolumeSource_To_core_FCVolumeSource", "(", "in", "*", "v1", ".", "FCVolumeSource", ",", "out", "*", "core", ".", "FCVolumeSource", ",", "s", "conversion", ".", "Scope", ")", "error", "{", "return", "autoConvert_v1_FCVolumeSource_To_core_FCVolumeSou...
// Convert_v1_FCVolumeSource_To_core_FCVolumeSource is an autogenerated conversion function.
[ "Convert_v1_FCVolumeSource_To_core_FCVolumeSource", "is", "an", "autogenerated", "conversion", "function", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/core/v1/zz_generated.conversion.go#L3486-L3488
train
Convert_v1_FCVolumeSource_To_core_FCVolumeSource is an autogenerated conversion function.
[ 30522, 4569, 2278, 10463, 1035, 1058, 2487, 1035, 4429, 6767, 12942, 2229, 8162, 3401, 1035, 2000, 1035, 4563, 1035, 4429, 6767, 12942, 2229, 8162, 3401, 1006, 1999, 1008, 1058, 2487, 1012, 4429, 6767, 12942, 2229, 8162, 3401, 1010, 2041, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
cmd/kubelet/app/server.go
setContentTypeForClient
func setContentTypeForClient(cfg *restclient.Config, contentType string) { if len(contentType) == 0 { return } cfg.ContentType = contentType switch contentType { case runtime.ContentTypeProtobuf: cfg.AcceptContentTypes = strings.Join([]string{runtime.ContentTypeProtobuf, runtime.ContentTypeJSON}, ",") default...
go
func setContentTypeForClient(cfg *restclient.Config, contentType string) { if len(contentType) == 0 { return } cfg.ContentType = contentType switch contentType { case runtime.ContentTypeProtobuf: cfg.AcceptContentTypes = strings.Join([]string{runtime.ContentTypeProtobuf, runtime.ContentTypeJSON}, ",") default...
[ "func", "setContentTypeForClient", "(", "cfg", "*", "restclient", ".", "Config", ",", "contentType", "string", ")", "{", "if", "len", "(", "contentType", ")", "==", "0", "{", "return", "\n", "}", "\n", "cfg", ".", "ContentType", "=", "contentType", "\n", ...
// setContentTypeForClient sets the appropritae content type into the rest config // and handles defaulting AcceptContentTypes based on that input.
[ "setContentTypeForClient", "sets", "the", "appropritae", "content", "type", "into", "the", "rest", "config", "and", "handles", "defaulting", "AcceptContentTypes", "based", "on", "that", "input", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/cmd/kubelet/app/server.go#L942-L953
train
setContentTypeForClient sets the content type for the client
[ 30522, 4569, 2278, 2275, 8663, 6528, 15353, 5051, 29278, 20464, 11638, 1006, 12935, 2290, 1008, 2717, 20464, 11638, 1012, 9530, 8873, 2290, 1010, 4180, 13874, 5164, 1007, 1063, 2065, 18798, 1006, 4180, 13874, 1007, 1027, 1027, 1014, 1063, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/volume/util/device_util_linux.go
GetISCSIPortalHostMapForTarget
func (handler *deviceHandler) GetISCSIPortalHostMapForTarget(targetIqn string) (map[string]int, error) { portalHostMap := make(map[string]int) io := handler.getIo // Iterate over all the iSCSI hosts in sysfs sysPath := "/sys/class/iscsi_host" hostDirs, err := io.ReadDir(sysPath) if err != nil { if os.IsNotExis...
go
func (handler *deviceHandler) GetISCSIPortalHostMapForTarget(targetIqn string) (map[string]int, error) { portalHostMap := make(map[string]int) io := handler.getIo // Iterate over all the iSCSI hosts in sysfs sysPath := "/sys/class/iscsi_host" hostDirs, err := io.ReadDir(sysPath) if err != nil { if os.IsNotExis...
[ "func", "(", "handler", "*", "deviceHandler", ")", "GetISCSIPortalHostMapForTarget", "(", "targetIqn", "string", ")", "(", "map", "[", "string", "]", "int", ",", "error", ")", "{", "portalHostMap", ":=", "make", "(", "map", "[", "string", "]", "int", ")", ...
// GetISCSIPortalHostMapForTarget given a target iqn, find all the scsi hosts logged into // that target. Returns a map of iSCSI portals (string) to SCSI host numbers (integers). // For example: { // "192.168.30.7:3260": 2, // "192.168.30.8:3260": 3, // }
[ "GetISCSIPortalHostMapForTarget", "given", "a", "target", "iqn", "find", "all", "the", "scsi", "hosts", "logged", "into", "that", "target", ".", "Returns", "a", "map", "of", "iSCSI", "portals", "(", "string", ")", "to", "SCSI", "host", "numbers", "(", "integ...
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/volume/util/device_util_linux.go#L95-L213
train
GetISCSIPortalHostMapForTarget returns the map of portal host names to the target name
[ 30522, 4569, 2278, 1006, 28213, 1008, 5080, 11774, 3917, 1007, 2131, 2483, 6169, 11514, 30524, 1013, 1013, 2009, 22139, 2058, 2035, 1996, 2003, 6169, 2072, 6184, 1999, 25353, 22747, 2015, 25353, 13102, 8988, 1024, 1027, 1000, 1013, 25353, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/apis/core/v1/zz_generated.conversion.go
Convert_v1_GitRepoVolumeSource_To_core_GitRepoVolumeSource
func Convert_v1_GitRepoVolumeSource_To_core_GitRepoVolumeSource(in *v1.GitRepoVolumeSource, out *core.GitRepoVolumeSource, s conversion.Scope) error { return autoConvert_v1_GitRepoVolumeSource_To_core_GitRepoVolumeSource(in, out, s) }
go
func Convert_v1_GitRepoVolumeSource_To_core_GitRepoVolumeSource(in *v1.GitRepoVolumeSource, out *core.GitRepoVolumeSource, s conversion.Scope) error { return autoConvert_v1_GitRepoVolumeSource_To_core_GitRepoVolumeSource(in, out, s) }
[ "func", "Convert_v1_GitRepoVolumeSource_To_core_GitRepoVolumeSource", "(", "in", "*", "v1", ".", "GitRepoVolumeSource", ",", "out", "*", "core", ".", "GitRepoVolumeSource", ",", "s", "conversion", ".", "Scope", ")", "error", "{", "return", "autoConvert_v1_GitRepoVolumeS...
// Convert_v1_GitRepoVolumeSource_To_core_GitRepoVolumeSource is an autogenerated conversion function.
[ "Convert_v1_GitRepoVolumeSource_To_core_GitRepoVolumeSource", "is", "an", "autogenerated", "conversion", "function", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/core/v1/zz_generated.conversion.go#L3616-L3618
train
Convert_v1_GitRepoVolumeSource_To_core_GitRepoVolumeSource is an autogenerated conversion function.
[ 30522, 4569, 2278, 10463, 1035, 1058, 2487, 1035, 21025, 7913, 6873, 6767, 12942, 2229, 8162, 3401, 1035, 2000, 1035, 4563, 1035, 21025, 7913, 6873, 6767, 12942, 2229, 8162, 3401, 1006, 1999, 1008, 1058, 2487, 1012, 21025, 7913, 6873, 6767,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/apis/core/zz_generated.deepcopy.go
DeepCopyInto
func (in *CinderVolumeSource) DeepCopyInto(out *CinderVolumeSource) { *out = *in if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef *out = new(LocalObjectReference) **out = **in } return }
go
func (in *CinderVolumeSource) DeepCopyInto(out *CinderVolumeSource) { *out = *in if in.SecretRef != nil { in, out := &in.SecretRef, &out.SecretRef *out = new(LocalObjectReference) **out = **in } return }
[ "func", "(", "in", "*", "CinderVolumeSource", ")", "DeepCopyInto", "(", "out", "*", "CinderVolumeSource", ")", "{", "*", "out", "=", "*", "in", "\n", "if", "in", ".", "SecretRef", "!=", "nil", "{", "in", ",", "out", ":=", "&", "in", ".", "SecretRef",...
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
[ "DeepCopyInto", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "writing", "into", "out", ".", "in", "must", "be", "non", "-", "nil", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/core/zz_generated.deepcopy.go#L391-L399
train
DeepCopyInto is an autogenerated deepcopy function copying the receiver creating a new CinderVolumeSource.
[ 30522, 4569, 2278, 1006, 1999, 1008, 29399, 6767, 12942, 2229, 8162, 3401, 1007, 2784, 3597, 7685, 18447, 2080, 1006, 2041, 1008, 29399, 6767, 12942, 2229, 8162, 3401, 1007, 1063, 1008, 2041, 1027, 1008, 1999, 2065, 1999, 1012, 3595, 2890, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/controller/deployment/sync.go
syncDeploymentStatus
func (dc *DeploymentController) syncDeploymentStatus(allRSs []*apps.ReplicaSet, newRS *apps.ReplicaSet, d *apps.Deployment) error { newStatus := calculateStatus(allRSs, newRS, d) if reflect.DeepEqual(d.Status, newStatus) { return nil } newDeployment := d newDeployment.Status = newStatus _, err := dc.client.Ap...
go
func (dc *DeploymentController) syncDeploymentStatus(allRSs []*apps.ReplicaSet, newRS *apps.ReplicaSet, d *apps.Deployment) error { newStatus := calculateStatus(allRSs, newRS, d) if reflect.DeepEqual(d.Status, newStatus) { return nil } newDeployment := d newDeployment.Status = newStatus _, err := dc.client.Ap...
[ "func", "(", "dc", "*", "DeploymentController", ")", "syncDeploymentStatus", "(", "allRSs", "[", "]", "*", "apps", ".", "ReplicaSet", ",", "newRS", "*", "apps", ".", "ReplicaSet", ",", "d", "*", "apps", ".", "Deployment", ")", "error", "{", "newStatus", ...
// syncDeploymentStatus checks if the status is up-to-date and sync it if necessary
[ "syncDeploymentStatus", "checks", "if", "the", "status", "is", "up", "-", "to", "-", "date", "and", "sync", "it", "if", "necessary" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/controller/deployment/sync.go#L463-L474
train
syncDeploymentStatus updates the deployment status of a replica set
[ 30522, 4569, 2278, 1006, 5887, 1008, 10813, 8663, 13181, 10820, 1007, 26351, 3207, 24759, 6977, 8163, 29336, 2271, 1006, 2035, 2869, 2015, 1031, 1033, 1008, 30524, 1027, 18422, 9153, 5809, 1006, 2035, 2869, 2015, 1010, 2047, 2869, 1010, 104...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
third_party/forked/gonum/graph/traverse/visit_depth_first.go
Reset
func (d *VisitingDepthFirst) Reset() { d.stack = d.stack[:0] if d.visited != nil { d.visited.Clear() } }
go
func (d *VisitingDepthFirst) Reset() { d.stack = d.stack[:0] if d.visited != nil { d.visited.Clear() } }
[ "func", "(", "d", "*", "VisitingDepthFirst", ")", "Reset", "(", ")", "{", "d", ".", "stack", "=", "d", ".", "stack", "[", ":", "0", "]", "\n", "if", "d", ".", "visited", "!=", "nil", "{", "d", ".", "visited", ".", "Clear", "(", ")", "\n", "}"...
// Reset resets the state of the traverser for reuse.
[ "Reset", "resets", "the", "state", "of", "the", "traverser", "for", "reuse", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/third_party/forked/gonum/graph/traverse/visit_depth_first.go#L81-L86
train
Reset resets the depth - first traversal stack.
[ 30522, 4569, 2278, 1006, 1040, 1008, 5873, 3207, 13876, 2232, 8873, 12096, 1007, 25141, 1006, 1007, 1063, 1040, 1012, 9991, 1027, 1040, 1012, 9991, 1031, 1024, 1014, 1033, 2065, 1040, 1012, 4716, 999, 1027, 9152, 2140, 1063, 1040, 1012, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
cmd/kubeadm/app/cmd/token.go
RunListTokens
func RunListTokens(out io.Writer, errW io.Writer, client clientset.Interface) error { // First, build our selector for bootstrap tokens only klog.V(1).Infoln("[token] preparing selector for bootstrap token") tokenSelector := fields.SelectorFromSet( map[string]string{ // TODO: We hard-code "type" here until `fie...
go
func RunListTokens(out io.Writer, errW io.Writer, client clientset.Interface) error { // First, build our selector for bootstrap tokens only klog.V(1).Infoln("[token] preparing selector for bootstrap token") tokenSelector := fields.SelectorFromSet( map[string]string{ // TODO: We hard-code "type" here until `fie...
[ "func", "RunListTokens", "(", "out", "io", ".", "Writer", ",", "errW", "io", ".", "Writer", ",", "client", "clientset", ".", "Interface", ")", "error", "{", "// First, build our selector for bootstrap tokens only", "klog", ".", "V", "(", "1", ")", ".", "Infoln...
// RunListTokens lists details on all existing bootstrap tokens on the server.
[ "RunListTokens", "lists", "details", "on", "all", "existing", "bootstrap", "tokens", "on", "the", "server", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/cmd/kubeadm/app/cmd/token.go#L259-L297
train
RunListTokens lists all the tokens in the system
[ 30522, 4569, 2278, 2448, 9863, 18715, 6132, 1006, 2041, 22834, 1012, 3213, 1010, 9413, 2099, 2860, 22834, 1012, 3213, 1010, 7396, 7846, 3388, 1012, 8278, 1007, 7561, 1063, 1013, 1013, 2034, 1010, 3857, 2256, 27000, 2005, 6879, 6494, 2361, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/registry/core/node/strategy.go
GetAttrs
func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { nodeObj, ok := obj.(*api.Node) if !ok { return nil, nil, fmt.Errorf("not a node") } return labels.Set(nodeObj.ObjectMeta.Labels), NodeToSelectableFields(nodeObj), nil }
go
func GetAttrs(obj runtime.Object) (labels.Set, fields.Set, error) { nodeObj, ok := obj.(*api.Node) if !ok { return nil, nil, fmt.Errorf("not a node") } return labels.Set(nodeObj.ObjectMeta.Labels), NodeToSelectableFields(nodeObj), nil }
[ "func", "GetAttrs", "(", "obj", "runtime", ".", "Object", ")", "(", "labels", ".", "Set", ",", "fields", ".", "Set", ",", "error", ")", "{", "nodeObj", ",", "ok", ":=", "obj", ".", "(", "*", "api", ".", "Node", ")", "\n", "if", "!", "ok", "{", ...
// GetAttrs returns labels and fields of a given object for filtering purposes.
[ "GetAttrs", "returns", "labels", "and", "fields", "of", "a", "given", "object", "for", "filtering", "purposes", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/registry/core/node/strategy.go#L184-L190
train
GetAttrs returns labels and fields of a node object
[ 30522, 4569, 2278, 2131, 19321, 2869, 1006, 27885, 3501, 2448, 7292, 1012, 4874, 1007, 1006, 10873, 1012, 2275, 1010, 4249, 1012, 2275, 1010, 7561, 1007, 1063, 13045, 16429, 3501, 1010, 7929, 1024, 1027, 27885, 3501, 1012, 1006, 1008, 17928...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/apimachinery/pkg/labels/selector.go
String
func (lsel internalSelector) String() string { var reqs []string for ix := range lsel { reqs = append(reqs, lsel[ix].String()) } return strings.Join(reqs, ",") }
go
func (lsel internalSelector) String() string { var reqs []string for ix := range lsel { reqs = append(reqs, lsel[ix].String()) } return strings.Join(reqs, ",") }
[ "func", "(", "lsel", "internalSelector", ")", "String", "(", ")", "string", "{", "var", "reqs", "[", "]", "string", "\n", "for", "ix", ":=", "range", "lsel", "{", "reqs", "=", "append", "(", "reqs", ",", "lsel", "[", "ix", "]", ".", "String", "(", ...
// String returns a comma-separated string of all // the internalSelector Requirements' human-readable strings.
[ "String", "returns", "a", "comma", "-", "separated", "string", "of", "all", "the", "internalSelector", "Requirements", "human", "-", "readable", "strings", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/apimachinery/pkg/labels/selector.go#L353-L359
train
String returns a string representation of the internalSelector.
[ 30522, 4569, 2278, 1006, 1048, 11246, 4722, 11246, 22471, 2953, 1007, 5164, 1006, 1007, 5164, 1063, 13075, 2128, 4160, 2015, 1031, 1033, 5164, 2005, 11814, 1024, 1027, 2846, 1048, 11246, 1063, 2128, 4160, 2015, 1027, 10439, 10497, 1006, 212...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/client-go/util/workqueue/default_rate_limiters.go
DefaultControllerRateLimiter
func DefaultControllerRateLimiter() RateLimiter { return NewMaxOfRateLimiter( NewItemExponentialFailureRateLimiter(5*time.Millisecond, 1000*time.Second), // 10 qps, 100 bucket size. This is only for retry speed and its only the overall factor (not per item) &BucketRateLimiter{Limiter: rate.NewLimiter(rate.Limit...
go
func DefaultControllerRateLimiter() RateLimiter { return NewMaxOfRateLimiter( NewItemExponentialFailureRateLimiter(5*time.Millisecond, 1000*time.Second), // 10 qps, 100 bucket size. This is only for retry speed and its only the overall factor (not per item) &BucketRateLimiter{Limiter: rate.NewLimiter(rate.Limit...
[ "func", "DefaultControllerRateLimiter", "(", ")", "RateLimiter", "{", "return", "NewMaxOfRateLimiter", "(", "NewItemExponentialFailureRateLimiter", "(", "5", "*", "time", ".", "Millisecond", ",", "1000", "*", "time", ".", "Second", ")", ",", "// 10 qps, 100 bucket siz...
// DefaultControllerRateLimiter is a no-arg constructor for a default rate limiter for a workqueue. It has // both overall and per-item rate limiting. The overall is a token bucket and the per-item is exponential
[ "DefaultControllerRateLimiter", "is", "a", "no", "-", "arg", "constructor", "for", "a", "default", "rate", "limiter", "for", "a", "workqueue", ".", "It", "has", "both", "overall", "and", "per", "-", "item", "rate", "limiting", ".", "The", "overall", "is", ...
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/client-go/util/workqueue/default_rate_limiters.go#L39-L45
train
DefaultControllerRateLimiter returns a RateLimiter that will use the default rate limiting for the controller.
[ 30522, 4569, 2278, 12398, 8663, 13181, 10820, 11657, 17960, 21646, 1006, 1007, 3446, 17960, 21646, 1063, 2709, 2047, 17848, 11253, 11657, 17960, 21646, 1006, 2047, 4221, 4168, 2595, 29513, 19909, 7011, 4014, 27595, 3686, 17960, 21646, 1006, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/scheduler/api/v1/zz_generated.deepcopy.go
DeepCopy
func (in *MetaPod) DeepCopy() *MetaPod { if in == nil { return nil } out := new(MetaPod) in.DeepCopyInto(out) return out }
go
func (in *MetaPod) DeepCopy() *MetaPod { if in == nil { return nil } out := new(MetaPod) in.DeepCopyInto(out) return out }
[ "func", "(", "in", "*", "MetaPod", ")", "DeepCopy", "(", ")", "*", "MetaPod", "{", "if", "in", "==", "nil", "{", "return", "nil", "\n", "}", "\n", "out", ":=", "new", "(", "MetaPod", ")", "\n", "in", ".", "DeepCopyInto", "(", "out", ")", "\n", ...
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetaPod.
[ "DeepCopy", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "creating", "a", "new", "MetaPod", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/scheduler/api/v1/zz_generated.deepcopy.go#L389-L396
train
DeepCopy is an autogenerated deepcopy function copying the receiver creating a new MetaPod.
[ 30522, 4569, 2278, 1006, 1999, 1008, 18804, 27633, 1007, 2784, 3597, 7685, 1006, 1007, 1008, 18804, 27633, 1063, 2065, 1999, 1027, 1027, 9152, 2140, 1063, 2709, 9152, 2140, 1065, 2041, 1024, 1027, 2047, 1006, 18804, 27633, 1007, 1999, 1012,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/kubectl/cmd/config/use_context.go
NewCmdConfigUseContext
func NewCmdConfigUseContext(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command { options := &useContextOptions{configAccess: configAccess} cmd := &cobra.Command{ Use: "use-context CONTEXT_NAME", DisableFlagsInUseLine: true, Short: i18n.T("Sets the current-conte...
go
func NewCmdConfigUseContext(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command { options := &useContextOptions{configAccess: configAccess} cmd := &cobra.Command{ Use: "use-context CONTEXT_NAME", DisableFlagsInUseLine: true, Short: i18n.T("Sets the current-conte...
[ "func", "NewCmdConfigUseContext", "(", "out", "io", ".", "Writer", ",", "configAccess", "clientcmd", ".", "ConfigAccess", ")", "*", "cobra", ".", "Command", "{", "options", ":=", "&", "useContextOptions", "{", "configAccess", ":", "configAccess", "}", "\n\n", ...
// NewCmdConfigUseContext returns a Command instance for 'config use-context' sub command
[ "NewCmdConfigUseContext", "returns", "a", "Command", "instance", "for", "config", "use", "-", "context", "sub", "command" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/kubectl/cmd/config/use_context.go#L45-L63
train
NewCmdConfigUseContext returns a new command that sets the current - context in a kubeconfig file.
[ 30522, 4569, 2278, 2047, 27487, 16409, 2239, 8873, 12349, 8586, 28040, 18413, 1006, 2041, 22834, 1012, 3213, 1010, 9530, 8873, 3654, 9468, 7971, 7396, 27487, 2094, 1012, 9530, 8873, 3654, 9468, 7971, 1007, 1008, 16604, 1012, 3094, 1063, 704...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/controller/apis/config/v1alpha1/conversion.go
Convert_config_GenericControllerManagerConfiguration_To_v1alpha1_GenericControllerManagerConfiguration
func Convert_config_GenericControllerManagerConfiguration_To_v1alpha1_GenericControllerManagerConfiguration(in *config.GenericControllerManagerConfiguration, out *v1alpha1.GenericControllerManagerConfiguration, s conversion.Scope) error { return autoConvert_config_GenericControllerManagerConfiguration_To_v1alpha1_Gene...
go
func Convert_config_GenericControllerManagerConfiguration_To_v1alpha1_GenericControllerManagerConfiguration(in *config.GenericControllerManagerConfiguration, out *v1alpha1.GenericControllerManagerConfiguration, s conversion.Scope) error { return autoConvert_config_GenericControllerManagerConfiguration_To_v1alpha1_Gene...
[ "func", "Convert_config_GenericControllerManagerConfiguration_To_v1alpha1_GenericControllerManagerConfiguration", "(", "in", "*", "config", ".", "GenericControllerManagerConfiguration", ",", "out", "*", "v1alpha1", ".", "GenericControllerManagerConfiguration", ",", "s", "conversion",...
// Convert_config_GenericControllerManagerConfiguration_To_v1alpha1_GenericControllerManagerConfiguration is an autogenerated conversion function.
[ "Convert_config_GenericControllerManagerConfiguration_To_v1alpha1_GenericControllerManagerConfiguration", "is", "an", "autogenerated", "conversion", "function", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/controller/apis/config/v1alpha1/conversion.go#L38-L40
train
Convert_config_GenericControllerManagerConfiguration_To_v1alpha1_GenericControllerManagerConfiguration is an autogenerated conversion function.
[ 30522, 4569, 2278, 10463, 1035, 9530, 8873, 2290, 1035, 12391, 8663, 13181, 10820, 24805, 4590, 8663, 8873, 27390, 3370, 1035, 2000, 1035, 1058, 2487, 2389, 21890, 2487, 1035, 12391, 8663, 13181, 10820, 24805, 4590, 8663, 8873, 27390, 3370, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
cmd/kubeadm/app/phases/controlplane/manifests.go
CreateStaticPodFiles
func CreateStaticPodFiles(manifestDir string, cfg *kubeadmapi.ClusterConfiguration, endpoint *kubeadmapi.APIEndpoint, componentNames ...string) error { // TODO: Move the "pkg/util/version".Version object into the internal API instead of always parsing the string k8sVersion, err := version.ParseSemantic(cfg.Kubernetes...
go
func CreateStaticPodFiles(manifestDir string, cfg *kubeadmapi.ClusterConfiguration, endpoint *kubeadmapi.APIEndpoint, componentNames ...string) error { // TODO: Move the "pkg/util/version".Version object into the internal API instead of always parsing the string k8sVersion, err := version.ParseSemantic(cfg.Kubernetes...
[ "func", "CreateStaticPodFiles", "(", "manifestDir", "string", ",", "cfg", "*", "kubeadmapi", ".", "ClusterConfiguration", ",", "endpoint", "*", "kubeadmapi", ".", "APIEndpoint", ",", "componentNames", "...", "string", ")", "error", "{", "// TODO: Move the \"pkg/util/v...
// CreateStaticPodFiles creates all the requested static pod files.
[ "CreateStaticPodFiles", "creates", "all", "the", "requested", "static", "pod", "files", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/cmd/kubeadm/app/phases/controlplane/manifests.go#L107-L135
train
CreateStaticPodFiles creates the static pod files for the given components
[ 30522, 4569, 2278, 9005, 29336, 2594, 27633, 8873, 4244, 1006, 19676, 4305, 2099, 5164, 1010, 12935, 2290, 1008, 13970, 4783, 4215, 2863, 8197, 1012, 9324, 8663, 8873, 27390, 3370, 1010, 2203, 8400, 1008, 13970, 4783, 4215, 2863, 8197, 1012...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/kubelet/volumemanager/volume_manager.go
verifyVolumesMountedFunc
func (vm *volumeManager) verifyVolumesMountedFunc(podName types.UniquePodName, expectedVolumes []string) wait.ConditionFunc { return func() (done bool, err error) { return len(vm.getUnmountedVolumes(podName, expectedVolumes)) == 0, nil } }
go
func (vm *volumeManager) verifyVolumesMountedFunc(podName types.UniquePodName, expectedVolumes []string) wait.ConditionFunc { return func() (done bool, err error) { return len(vm.getUnmountedVolumes(podName, expectedVolumes)) == 0, nil } }
[ "func", "(", "vm", "*", "volumeManager", ")", "verifyVolumesMountedFunc", "(", "podName", "types", ".", "UniquePodName", ",", "expectedVolumes", "[", "]", "string", ")", "wait", ".", "ConditionFunc", "{", "return", "func", "(", ")", "(", "done", "bool", ",",...
// verifyVolumesMountedFunc returns a method that returns true when all expected // volumes are mounted.
[ "verifyVolumesMountedFunc", "returns", "a", "method", "that", "returns", "true", "when", "all", "expected", "volumes", "are", "mounted", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/kubelet/volumemanager/volume_manager.go#L401-L405
train
verifyVolumesMountedFunc returns a condition function that returns true if the volume manager is mounted.
[ 30522, 4569, 2278, 1006, 1058, 2213, 1008, 3872, 24805, 4590, 1007, 20410, 6767, 12942, 2229, 27632, 11263, 12273, 1006, 17491, 18442, 4127, 1012, 4310, 27633, 18442, 1010, 3517, 6767, 12942, 2229, 1031, 1033, 5164, 1007, 3524, 1012, 4650, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/apis/networking/v1beta1/zz_generated.conversion.go
Convert_v1beta1_IngressStatus_To_networking_IngressStatus
func Convert_v1beta1_IngressStatus_To_networking_IngressStatus(in *v1beta1.IngressStatus, out *networking.IngressStatus, s conversion.Scope) error { return autoConvert_v1beta1_IngressStatus_To_networking_IngressStatus(in, out, s) }
go
func Convert_v1beta1_IngressStatus_To_networking_IngressStatus(in *v1beta1.IngressStatus, out *networking.IngressStatus, s conversion.Scope) error { return autoConvert_v1beta1_IngressStatus_To_networking_IngressStatus(in, out, s) }
[ "func", "Convert_v1beta1_IngressStatus_To_networking_IngressStatus", "(", "in", "*", "v1beta1", ".", "IngressStatus", ",", "out", "*", "networking", ".", "IngressStatus", ",", "s", "conversion", ".", "Scope", ")", "error", "{", "return", "autoConvert_v1beta1_IngressStat...
// Convert_v1beta1_IngressStatus_To_networking_IngressStatus is an autogenerated conversion function.
[ "Convert_v1beta1_IngressStatus_To_networking_IngressStatus", "is", "an", "autogenerated", "conversion", "function", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/networking/v1beta1/zz_generated.conversion.go#L343-L345
train
Convert_v1beta1_IngressStatus_To_networking_IngressStatus is an autogenerated conversion function.
[ 30522, 4569, 2278, 10463, 1035, 1058, 2487, 20915, 27717, 1035, 13749, 8303, 9153, 5809, 1035, 2000, 1035, 14048, 1035, 13749, 8303, 9153, 5809, 1006, 1999, 1008, 1058, 2487, 20915, 27717, 1012, 13749, 8303, 9153, 5809, 1010, 2041, 1008, 14...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
cmd/kubeadm/app/constants/constants.go
GetKubeletConfigMapName
func GetKubeletConfigMapName(k8sVersion *version.Version) string { return fmt.Sprintf("%s%d.%d", KubeletBaseConfigurationConfigMapPrefix, k8sVersion.Major(), k8sVersion.Minor()) }
go
func GetKubeletConfigMapName(k8sVersion *version.Version) string { return fmt.Sprintf("%s%d.%d", KubeletBaseConfigurationConfigMapPrefix, k8sVersion.Major(), k8sVersion.Minor()) }
[ "func", "GetKubeletConfigMapName", "(", "k8sVersion", "*", "version", ".", "Version", ")", "string", "{", "return", "fmt", ".", "Sprintf", "(", "\"", "\"", ",", "KubeletBaseConfigurationConfigMapPrefix", ",", "k8sVersion", ".", "Major", "(", ")", ",", "k8sVersio...
// GetKubeletConfigMapName returns the right ConfigMap name for the right branch of k8s
[ "GetKubeletConfigMapName", "returns", "the", "right", "ConfigMap", "name", "for", "the", "right", "branch", "of", "k8s" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/cmd/kubeadm/app/constants/constants.go#L515-L517
train
GetKubeletConfigMapName returns the name of the kubelet config map for the given version.
[ 30522, 4569, 2278, 2131, 5283, 8671, 3388, 8663, 8873, 21693, 9331, 18442, 1006, 1047, 2620, 2015, 27774, 1008, 2544, 1012, 2544, 1007, 5164, 1063, 2709, 4718, 2102, 1012, 9043, 2546, 1006, 1000, 1003, 1055, 1003, 1040, 1012, 1003, 1040, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go
DeepCopyInto
func (in *RollingUpdateDaemonSet) DeepCopyInto(out *RollingUpdateDaemonSet) { *out = *in if in.MaxUnavailable != nil { in, out := &in.MaxUnavailable, &out.MaxUnavailable *out = new(intstr.IntOrString) **out = **in } return }
go
func (in *RollingUpdateDaemonSet) DeepCopyInto(out *RollingUpdateDaemonSet) { *out = *in if in.MaxUnavailable != nil { in, out := &in.MaxUnavailable, &out.MaxUnavailable *out = new(intstr.IntOrString) **out = **in } return }
[ "func", "(", "in", "*", "RollingUpdateDaemonSet", ")", "DeepCopyInto", "(", "out", "*", "RollingUpdateDaemonSet", ")", "{", "*", "out", "=", "*", "in", "\n", "if", "in", ".", "MaxUnavailable", "!=", "nil", "{", "in", ",", "out", ":=", "&", "in", ".", ...
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
[ "DeepCopyInto", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "writing", "into", "out", ".", "in", "must", "be", "non", "-", "nil", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/api/extensions/v1beta1/zz_generated.deepcopy.go#L1276-L1284
train
DeepCopyInto is an autogenerated deepcopy function copying the receiver creating a new RollingUpdateDaemonSet.
[ 30522, 4569, 2278, 1006, 1999, 1008, 5291, 6279, 13701, 6858, 16563, 3388, 1007, 2784, 3597, 7685, 18447, 2080, 1006, 2041, 1008, 5291, 6279, 13701, 6858, 16563, 3388, 1007, 1063, 1008, 2041, 1027, 1008, 1999, 2065, 1999, 1012, 4098, 9521, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/kubelet/volumemanager/reconciler/reconciler.go
updateDevicePath
func (rc *reconciler) updateDevicePath(volumesNeedUpdate map[v1.UniqueVolumeName]*reconstructedVolume) { node, fetchErr := rc.kubeClient.CoreV1().Nodes().Get(string(rc.nodeName), metav1.GetOptions{}) if fetchErr != nil { klog.Errorf("updateStates in reconciler: could not get node status with error %v", fetchErr) }...
go
func (rc *reconciler) updateDevicePath(volumesNeedUpdate map[v1.UniqueVolumeName]*reconstructedVolume) { node, fetchErr := rc.kubeClient.CoreV1().Nodes().Get(string(rc.nodeName), metav1.GetOptions{}) if fetchErr != nil { klog.Errorf("updateStates in reconciler: could not get node status with error %v", fetchErr) }...
[ "func", "(", "rc", "*", "reconciler", ")", "updateDevicePath", "(", "volumesNeedUpdate", "map", "[", "v1", ".", "UniqueVolumeName", "]", "*", "reconstructedVolume", ")", "{", "node", ",", "fetchErr", ":=", "rc", ".", "kubeClient", ".", "CoreV1", "(", ")", ...
// updateDevicePath gets the node status to retrieve volume device path information.
[ "updateDevicePath", "gets", "the", "node", "status", "to", "retrieve", "volume", "device", "path", "information", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/kubelet/volumemanager/reconciler/reconciler.go#L558-L571
train
updateDevicePath updates the devicePath of the node
[ 30522, 4569, 2278, 1006, 22110, 1008, 21063, 2099, 1007, 7172, 17726, 13699, 8988, 1006, 6702, 24045, 8566, 17299, 3686, 4949, 1031, 1058, 2487, 1012, 4310, 6767, 12942, 8189, 4168, 1033, 1008, 14858, 6767, 12942, 2063, 1007, 1063, 13045, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/apis/core/v1/zz_generated.conversion.go
Convert_core_ScopedResourceSelectorRequirement_To_v1_ScopedResourceSelectorRequirement
func Convert_core_ScopedResourceSelectorRequirement_To_v1_ScopedResourceSelectorRequirement(in *core.ScopedResourceSelectorRequirement, out *v1.ScopedResourceSelectorRequirement, s conversion.Scope) error { return autoConvert_core_ScopedResourceSelectorRequirement_To_v1_ScopedResourceSelectorRequirement(in, out, s) }
go
func Convert_core_ScopedResourceSelectorRequirement_To_v1_ScopedResourceSelectorRequirement(in *core.ScopedResourceSelectorRequirement, out *v1.ScopedResourceSelectorRequirement, s conversion.Scope) error { return autoConvert_core_ScopedResourceSelectorRequirement_To_v1_ScopedResourceSelectorRequirement(in, out, s) }
[ "func", "Convert_core_ScopedResourceSelectorRequirement_To_v1_ScopedResourceSelectorRequirement", "(", "in", "*", "core", ".", "ScopedResourceSelectorRequirement", ",", "out", "*", "v1", ".", "ScopedResourceSelectorRequirement", ",", "s", "conversion", ".", "Scope", ")", "err...
// Convert_core_ScopedResourceSelectorRequirement_To_v1_ScopedResourceSelectorRequirement is an autogenerated conversion function.
[ "Convert_core_ScopedResourceSelectorRequirement_To_v1_ScopedResourceSelectorRequirement", "is", "an", "autogenerated", "conversion", "function", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/core/v1/zz_generated.conversion.go#L6553-L6555
train
Convert_core_ScopedResourceSelectorRequirement_To_v1_ScopedResourceSelectorRequirement is an autogenerated conversion function.
[ 30522, 4569, 2278, 10463, 1035, 4563, 1035, 9531, 16200, 6499, 3126, 9623, 12260, 16761, 2890, 15549, 28578, 4765, 1035, 2000, 1035, 1058, 2487, 1035, 9531, 16200, 6499, 3126, 9623, 12260, 16761, 2890, 15549, 28578, 4765, 1006, 1999, 1008, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/volume/util/fs/fs.go
DiskUsage
func DiskUsage(path string) (*resource.Quantity, error) { // Uses the same niceness level as cadvisor.fs does when running du // Uses -B 1 to always scale to a blocksize of 1 byte out, err := exec.Command("nice", "-n", "19", "du", "-s", "-B", "1", path).CombinedOutput() if err != nil { return nil, fmt.Errorf("fai...
go
func DiskUsage(path string) (*resource.Quantity, error) { // Uses the same niceness level as cadvisor.fs does when running du // Uses -B 1 to always scale to a blocksize of 1 byte out, err := exec.Command("nice", "-n", "19", "du", "-s", "-B", "1", path).CombinedOutput() if err != nil { return nil, fmt.Errorf("fai...
[ "func", "DiskUsage", "(", "path", "string", ")", "(", "*", "resource", ".", "Quantity", ",", "error", ")", "{", "// Uses the same niceness level as cadvisor.fs does when running du", "// Uses -B 1 to always scale to a blocksize of 1 byte", "out", ",", "err", ":=", "exec", ...
// DiskUsage gets disk usage of specified path.
[ "DiskUsage", "gets", "disk", "usage", "of", "specified", "path", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/volume/util/fs/fs.go#L58-L71
train
DiskUsage returns the disk usage of the disk
[ 30522, 4569, 2278, 9785, 10383, 3351, 1006, 4130, 5164, 1007, 1006, 1008, 7692, 1012, 11712, 1010, 7561, 1007, 1063, 1013, 1013, 3594, 1996, 2168, 3835, 2791, 2504, 2004, 28353, 11365, 2953, 1012, 1042, 2015, 2515, 2043, 2770, 4241, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/registry/rbac/clusterrolebinding/strategy.go
PrepareForUpdate
func (strategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { newClusterRoleBinding := obj.(*rbac.ClusterRoleBinding) oldClusterRoleBinding := old.(*rbac.ClusterRoleBinding) _, _ = newClusterRoleBinding, oldClusterRoleBinding }
go
func (strategy) PrepareForUpdate(ctx context.Context, obj, old runtime.Object) { newClusterRoleBinding := obj.(*rbac.ClusterRoleBinding) oldClusterRoleBinding := old.(*rbac.ClusterRoleBinding) _, _ = newClusterRoleBinding, oldClusterRoleBinding }
[ "func", "(", "strategy", ")", "PrepareForUpdate", "(", "ctx", "context", ".", "Context", ",", "obj", ",", "old", "runtime", ".", "Object", ")", "{", "newClusterRoleBinding", ":=", "obj", ".", "(", "*", "rbac", ".", "ClusterRoleBinding", ")", "\n", "oldClus...
// PrepareForUpdate clears fields that are not allowed to be set by end users on update.
[ "PrepareForUpdate", "clears", "fields", "that", "are", "not", "allowed", "to", "be", "set", "by", "end", "users", "on", "update", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/registry/rbac/clusterrolebinding/strategy.go#L64-L69
train
PrepareForUpdate clears fields that are not allowed to be set by end users on update.
[ 30522, 4569, 2278, 1006, 5656, 1007, 7374, 29278, 6279, 13701, 1006, 14931, 2595, 6123, 1012, 6123, 1010, 27885, 3501, 1010, 2214, 2448, 7292, 1012, 4874, 1007, 1063, 2047, 20464, 19966, 2121, 13153, 15878, 22254, 2075, 1024, 1027, 27885, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/apis/core/v1/zz_generated.conversion.go
Convert_core_SecurityContext_To_v1_SecurityContext
func Convert_core_SecurityContext_To_v1_SecurityContext(in *core.SecurityContext, out *v1.SecurityContext, s conversion.Scope) error { return autoConvert_core_SecurityContext_To_v1_SecurityContext(in, out, s) }
go
func Convert_core_SecurityContext_To_v1_SecurityContext(in *core.SecurityContext, out *v1.SecurityContext, s conversion.Scope) error { return autoConvert_core_SecurityContext_To_v1_SecurityContext(in, out, s) }
[ "func", "Convert_core_SecurityContext_To_v1_SecurityContext", "(", "in", "*", "core", ".", "SecurityContext", ",", "out", "*", "v1", ".", "SecurityContext", ",", "s", "conversion", ".", "Scope", ")", "error", "{", "return", "autoConvert_core_SecurityContext_To_v1_Securi...
// Convert_core_SecurityContext_To_v1_SecurityContext is an autogenerated conversion function.
[ "Convert_core_SecurityContext_To_v1_SecurityContext", "is", "an", "autogenerated", "conversion", "function", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/core/v1/zz_generated.conversion.go#L6783-L6785
train
Convert_core_SecurityContext_To_v1_SecurityContext is an autogenerated conversion function.
[ 30522, 4569, 2278, 10463, 1035, 4563, 1035, 3036, 8663, 18209, 1035, 2000, 1035, 1058, 2487, 1035, 3036, 8663, 18209, 1006, 1999, 1008, 4563, 1012, 3036, 8663, 18209, 1010, 2041, 1008, 1058, 2487, 1012, 3036, 8663, 18209, 1010, 1055, 7584, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/apis/core/v1/zz_generated.conversion.go
Convert_core_Lifecycle_To_v1_Lifecycle
func Convert_core_Lifecycle_To_v1_Lifecycle(in *core.Lifecycle, out *v1.Lifecycle, s conversion.Scope) error { return autoConvert_core_Lifecycle_To_v1_Lifecycle(in, out, s) }
go
func Convert_core_Lifecycle_To_v1_Lifecycle(in *core.Lifecycle, out *v1.Lifecycle, s conversion.Scope) error { return autoConvert_core_Lifecycle_To_v1_Lifecycle(in, out, s) }
[ "func", "Convert_core_Lifecycle_To_v1_Lifecycle", "(", "in", "*", "core", ".", "Lifecycle", ",", "out", "*", "v1", ".", "Lifecycle", ",", "s", "conversion", ".", "Scope", ")", "error", "{", "return", "autoConvert_core_Lifecycle_To_v1_Lifecycle", "(", "in", ",", ...
// Convert_core_Lifecycle_To_v1_Lifecycle is an autogenerated conversion function.
[ "Convert_core_Lifecycle_To_v1_Lifecycle", "is", "an", "autogenerated", "conversion", "function", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/core/v1/zz_generated.conversion.go#L3922-L3924
train
Convert_core_Lifecycle_To_v1_Lifecycle is an autogenerated conversion function.
[ 30522, 4569, 2278, 10463, 1035, 4563, 1035, 2166, 23490, 1035, 2000, 1035, 1058, 2487, 1035, 2166, 23490, 1006, 1999, 1008, 4563, 1012, 2166, 23490, 1010, 2041, 1008, 1058, 2487, 1012, 2166, 23490, 1010, 1055, 7584, 1012, 9531, 1007, 7561, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/cloudprovider/providers/cloudstack/cloudstack.go
GetZoneByNodeName
func (cs *CSCloud) GetZoneByNodeName(ctx context.Context, nodeName types.NodeName) (cloudprovider.Zone, error) { zone := cloudprovider.Zone{} instance, count, err := cs.client.VirtualMachine.GetVirtualMachineByName( string(nodeName), cloudstack.WithProject(cs.projectID), ) if err != nil { if count == 0 { ...
go
func (cs *CSCloud) GetZoneByNodeName(ctx context.Context, nodeName types.NodeName) (cloudprovider.Zone, error) { zone := cloudprovider.Zone{} instance, count, err := cs.client.VirtualMachine.GetVirtualMachineByName( string(nodeName), cloudstack.WithProject(cs.projectID), ) if err != nil { if count == 0 { ...
[ "func", "(", "cs", "*", "CSCloud", ")", "GetZoneByNodeName", "(", "ctx", "context", ".", "Context", ",", "nodeName", "types", ".", "NodeName", ")", "(", "cloudprovider", ".", "Zone", ",", "error", ")", "{", "zone", ":=", "cloudprovider", ".", "Zone", "{"...
// GetZoneByNodeName returns the Zone, found by using the node name.
[ "GetZoneByNodeName", "returns", "the", "Zone", "found", "by", "using", "the", "node", "name", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/cloudprovider/providers/cloudstack/cloudstack.go#L246-L265
train
GetZoneByNodeName returns the zone of the node with the given nodeName.
[ 30522, 4569, 2278, 1006, 20116, 1008, 20116, 20464, 19224, 1007, 2131, 15975, 3762, 3630, 4181, 14074, 1006, 14931, 2595, 6123, 1012, 6123, 1010, 13045, 18442, 4127, 1012, 13045, 18442, 1007, 1006, 6112, 21572, 17258, 2121, 1012, 4224, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go
sliceElementType
func sliceElementType(slices ...[]interface{}) (reflect.Type, error) { var prevType reflect.Type for _, s := range slices { // Go through elements of all given slices and make sure they are all the same type. for _, v := range s { currentType := reflect.TypeOf(v) if prevType == nil { prevType = currentT...
go
func sliceElementType(slices ...[]interface{}) (reflect.Type, error) { var prevType reflect.Type for _, s := range slices { // Go through elements of all given slices and make sure they are all the same type. for _, v := range s { currentType := reflect.TypeOf(v) if prevType == nil { prevType = currentT...
[ "func", "sliceElementType", "(", "slices", "...", "[", "]", "interface", "{", "}", ")", "(", "reflect", ".", "Type", ",", "error", ")", "{", "var", "prevType", "reflect", ".", "Type", "\n", "for", "_", ",", "s", ":=", "range", "slices", "{", "// Go t...
// Returns the type of the elements of N slice(s). If the type is different, // another slice or undefined, returns an error.
[ "Returns", "the", "type", "of", "the", "elements", "of", "N", "slice", "(", "s", ")", ".", "If", "the", "type", "is", "different", "another", "slice", "or", "undefined", "returns", "an", "error", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go#L1802-L1828
train
sliceElementType returns the type of the first element of the given slices.
[ 30522, 4569, 2278, 14704, 12260, 3672, 13874, 1006, 25609, 1012, 1012, 1012, 1031, 1033, 8278, 1063, 1065, 1007, 1006, 8339, 1012, 2828, 1010, 7561, 1007, 1063, 13075, 3653, 2615, 13874, 8339, 1012, 2828, 2005, 1035, 1010, 1055, 1024, 1027,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta.go
ValidateObjectMetaAccessor
func ValidateObjectMetaAccessor(meta metav1.Object, requiresNamespace bool, nameFn ValidateNameFunc, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} if len(meta.GetGenerateName()) != 0 { for _, msg := range nameFn(meta.GetGenerateName(), true) { allErrs = append(allErrs, field.Invalid(fldPat...
go
func ValidateObjectMetaAccessor(meta metav1.Object, requiresNamespace bool, nameFn ValidateNameFunc, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} if len(meta.GetGenerateName()) != 0 { for _, msg := range nameFn(meta.GetGenerateName(), true) { allErrs = append(allErrs, field.Invalid(fldPat...
[ "func", "ValidateObjectMetaAccessor", "(", "meta", "metav1", ".", "Object", ",", "requiresNamespace", "bool", ",", "nameFn", "ValidateNameFunc", ",", "fldPath", "*", "field", ".", "Path", ")", "field", ".", "ErrorList", "{", "allErrs", ":=", "field", ".", "Err...
// ValidateObjectMeta validates an object's metadata on creation. It expects that name generation has already // been performed. // It doesn't return an error for rootscoped resources with namespace, because namespace should already be cleared before.
[ "ValidateObjectMeta", "validates", "an", "object", "s", "metadata", "on", "creation", ".", "It", "expects", "that", "name", "generation", "has", "already", "been", "performed", ".", "It", "doesn", "t", "return", "an", "error", "for", "rootscoped", "resources", ...
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta.go#L143-L188
train
ValidateObjectMetaAccessor validates the given object.
[ 30522, 4569, 2278, 9398, 3686, 16429, 20614, 11368, 11057, 9468, 7971, 2953, 1006, 18804, 18804, 2615, 2487, 1012, 4874, 1010, 5942, 18442, 23058, 22017, 2140, 1010, 2171, 2546, 2078, 9398, 3686, 18442, 11263, 12273, 1010, 13109, 18927, 8988,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/util/dbus/dbus.go
SystemBus
func (db *dbusImpl) SystemBus() (Connection, error) { if db.systemBus == nil { bus, err := godbus.SystemBus() if err != nil { return nil, err } db.systemBus = &connImpl{bus} } return db.systemBus, nil }
go
func (db *dbusImpl) SystemBus() (Connection, error) { if db.systemBus == nil { bus, err := godbus.SystemBus() if err != nil { return nil, err } db.systemBus = &connImpl{bus} } return db.systemBus, nil }
[ "func", "(", "db", "*", "dbusImpl", ")", "SystemBus", "(", ")", "(", "Connection", ",", "error", ")", "{", "if", "db", ".", "systemBus", "==", "nil", "{", "bus", ",", "err", ":=", "godbus", ".", "SystemBus", "(", ")", "\n", "if", "err", "!=", "ni...
// SystemBus is part of Interface
[ "SystemBus", "is", "part", "of", "Interface" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/util/dbus/dbus.go#L85-L95
train
SystemBus returns the system bus connection.
[ 30522, 4569, 2278, 1006, 16962, 1008, 16962, 2271, 5714, 24759, 1007, 2291, 8286, 1006, 1007, 1006, 4434, 1010, 7561, 1007, 1063, 2065, 16962, 1012, 2291, 8286, 1027, 1027, 9152, 2140, 1063, 3902, 1010, 9413, 2099, 1024, 1027, 2643, 8286, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/apiserver/pkg/server/routes/index.go
ListedPaths
func (p ListedPathProviders) ListedPaths() []string { ret := sets.String{} for _, provider := range p { for _, path := range provider.ListedPaths() { ret.Insert(path) } } return ret.List() }
go
func (p ListedPathProviders) ListedPaths() []string { ret := sets.String{} for _, provider := range p { for _, path := range provider.ListedPaths() { ret.Insert(path) } } return ret.List() }
[ "func", "(", "p", "ListedPathProviders", ")", "ListedPaths", "(", ")", "[", "]", "string", "{", "ret", ":=", "sets", ".", "String", "{", "}", "\n", "for", "_", ",", "provider", ":=", "range", "p", "{", "for", "_", ",", "path", ":=", "range", "provi...
// ListedPaths unions and sorts the included paths.
[ "ListedPaths", "unions", "and", "sorts", "the", "included", "paths", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/apiserver/pkg/server/routes/index.go#L38-L47
train
ListedPaths returns a list of paths that are registered in the list of providers.
[ 30522, 4569, 2278, 1006, 1052, 3205, 15069, 21572, 17258, 2545, 1007, 3205, 15069, 2015, 1006, 1007, 1031, 1033, 5164, 1063, 2128, 2102, 1024, 1027, 4520, 1012, 5164, 1063, 1065, 2005, 1035, 1010, 10802, 1024, 1027, 2846, 1052, 1063, 2005, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
cmd/kubeadm/app/cmd/config.go
NewCmdConfigPrint
func NewCmdConfigPrint(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "print", Short: "Print configuration", Long: "This command prints configurations for subcommands provided.", RunE: cmdutil.SubCmdRunE("print"), } cmd.AddCommand(NewCmdConfigPrintInitDefaults(out)) cmd.AddCommand(NewCmdCon...
go
func NewCmdConfigPrint(out io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "print", Short: "Print configuration", Long: "This command prints configurations for subcommands provided.", RunE: cmdutil.SubCmdRunE("print"), } cmd.AddCommand(NewCmdConfigPrintInitDefaults(out)) cmd.AddCommand(NewCmdCon...
[ "func", "NewCmdConfigPrint", "(", "out", "io", ".", "Writer", ")", "*", "cobra", ".", "Command", "{", "cmd", ":=", "&", "cobra", ".", "Command", "{", "Use", ":", "\"", "\"", ",", "Short", ":", "\"", "\"", ",", "Long", ":", "\"", "\"", ",", "RunE"...
// NewCmdConfigPrint returns cobra.Command for "kubeadm config print" command
[ "NewCmdConfigPrint", "returns", "cobra", ".", "Command", "for", "kubeadm", "config", "print", "command" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/cmd/kubeadm/app/cmd/config.go#L94-L104
train
NewCmdConfigPrint returns a new command to print the configuration for subcommands provided.
[ 30522, 4569, 2278, 2047, 27487, 16409, 2239, 8873, 21600, 6657, 2102, 1006, 2041, 22834, 1012, 3213, 1007, 1008, 16604, 1012, 3094, 1063, 4642, 2094, 1024, 1027, 1004, 16604, 1012, 3094, 1063, 2224, 1024, 1000, 6140, 1000, 1010, 2460, 1024,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/apis/core/pods/helpers.go
ConvertDownwardAPIFieldLabel
func ConvertDownwardAPIFieldLabel(version, label, value string) (string, string, error) { if version != "v1" { return "", "", fmt.Errorf("unsupported pod version: %s", version) } if path, _, ok := fieldpath.SplitMaybeSubscriptedPath(label); ok { switch path { case "metadata.annotations", "metadata.labels": ...
go
func ConvertDownwardAPIFieldLabel(version, label, value string) (string, string, error) { if version != "v1" { return "", "", fmt.Errorf("unsupported pod version: %s", version) } if path, _, ok := fieldpath.SplitMaybeSubscriptedPath(label); ok { switch path { case "metadata.annotations", "metadata.labels": ...
[ "func", "ConvertDownwardAPIFieldLabel", "(", "version", ",", "label", ",", "value", "string", ")", "(", "string", ",", "string", ",", "error", ")", "{", "if", "version", "!=", "\"", "\"", "{", "return", "\"", "\"", ",", "\"", "\"", ",", "fmt", ".", "...
// ConvertDownwardAPIFieldLabel converts the specified downward API field label // and its value in the pod of the specified version to the internal version, // and returns the converted label and value. This function returns an error if // the conversion fails.
[ "ConvertDownwardAPIFieldLabel", "converts", "the", "specified", "downward", "API", "field", "label", "and", "its", "value", "in", "the", "pod", "of", "the", "specified", "version", "to", "the", "internal", "version", "and", "returns", "the", "converted", "label", ...
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/core/pods/helpers.go#L29-L63
train
ConvertDownwardAPIFieldLabel converts a field label to a field value.
[ 30522, 4569, 2278, 10463, 7698, 7652, 9331, 10128, 12891, 20470, 2884, 1006, 2544, 1010, 3830, 1010, 3643, 5164, 1007, 1006, 5164, 1010, 5164, 1010, 7561, 1007, 1063, 2065, 2544, 999, 1027, 1000, 1058, 2487, 1000, 1063, 2709, 1000, 1000, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/controller/statefulset/stateful_set_utils.go
ApplyRevision
func ApplyRevision(set *apps.StatefulSet, revision *apps.ControllerRevision) (*apps.StatefulSet, error) { clone := set.DeepCopy() patched, err := strategicpatch.StrategicMergePatch([]byte(runtime.EncodeOrDie(patchCodec, clone)), revision.Data.Raw, clone) if err != nil { return nil, err } err = json.Unmarshal(pat...
go
func ApplyRevision(set *apps.StatefulSet, revision *apps.ControllerRevision) (*apps.StatefulSet, error) { clone := set.DeepCopy() patched, err := strategicpatch.StrategicMergePatch([]byte(runtime.EncodeOrDie(patchCodec, clone)), revision.Data.Raw, clone) if err != nil { return nil, err } err = json.Unmarshal(pat...
[ "func", "ApplyRevision", "(", "set", "*", "apps", ".", "StatefulSet", ",", "revision", "*", "apps", ".", "ControllerRevision", ")", "(", "*", "apps", ".", "StatefulSet", ",", "error", ")", "{", "clone", ":=", "set", ".", "DeepCopy", "(", ")", "\n", "pa...
// ApplyRevision returns a new StatefulSet constructed by restoring the state in revision to set. If the returned error // is nil, the returned StatefulSet is valid.
[ "ApplyRevision", "returns", "a", "new", "StatefulSet", "constructed", "by", "restoring", "the", "state", "in", "revision", "to", "set", ".", "If", "the", "returned", "error", "is", "nil", "the", "returned", "StatefulSet", "is", "valid", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/controller/statefulset/stateful_set_utils.go#L341-L352
train
ApplyRevision applies the given revision to the given set.
[ 30522, 4569, 2278, 6611, 2890, 17084, 1006, 2275, 1008, 18726, 1012, 2110, 3993, 13462, 1010, 13921, 1008, 18726, 1012, 11486, 2890, 17084, 1007, 1006, 1008, 18726, 1012, 2110, 3993, 13462, 1010, 7561, 1007, 1063, 17598, 1024, 1027, 2275, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/kubectl/cmd/cmd.go
Execute
func (h *DefaultPluginHandler) Execute(executablePath string, cmdArgs, environment []string) error { return syscall.Exec(executablePath, cmdArgs, environment) }
go
func (h *DefaultPluginHandler) Execute(executablePath string, cmdArgs, environment []string) error { return syscall.Exec(executablePath, cmdArgs, environment) }
[ "func", "(", "h", "*", "DefaultPluginHandler", ")", "Execute", "(", "executablePath", "string", ",", "cmdArgs", ",", "environment", "[", "]", "string", ")", "error", "{", "return", "syscall", ".", "Exec", "(", "executablePath", ",", "cmdArgs", ",", "environm...
// Execute implements PluginHandler
[ "Execute", "implements", "PluginHandler" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/kubectl/cmd/cmd.go#L366-L368
train
Execute executes a command in the specified directory.
[ 30522, 4569, 2278, 1006, 1044, 1008, 12398, 24759, 15916, 2378, 11774, 3917, 1007, 15389, 1006, 4654, 8586, 23056, 15069, 5164, 1010, 4642, 7662, 5620, 1010, 4044, 1031, 1033, 5164, 1007, 7561, 1063, 2709, 25353, 15782, 3363, 1012, 4654, 85...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/apis/core/zz_generated.deepcopy.go
DeepCopy
func (in *SessionAffinityConfig) DeepCopy() *SessionAffinityConfig { if in == nil { return nil } out := new(SessionAffinityConfig) in.DeepCopyInto(out) return out }
go
func (in *SessionAffinityConfig) DeepCopy() *SessionAffinityConfig { if in == nil { return nil } out := new(SessionAffinityConfig) in.DeepCopyInto(out) return out }
[ "func", "(", "in", "*", "SessionAffinityConfig", ")", "DeepCopy", "(", ")", "*", "SessionAffinityConfig", "{", "if", "in", "==", "nil", "{", "return", "nil", "\n", "}", "\n", "out", ":=", "new", "(", "SessionAffinityConfig", ")", "\n", "in", ".", "DeepCo...
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SessionAffinityConfig.
[ "DeepCopy", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "creating", "a", "new", "SessionAffinityConfig", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/core/zz_generated.deepcopy.go#L4980-L4987
train
DeepCopy is an autogenerated deepcopy function copying the receiver creating a new SessionAffinityConfig.
[ 30522, 4569, 2278, 1006, 1999, 1008, 5219, 10354, 16294, 3012, 8663, 8873, 2290, 1007, 2784, 3597, 7685, 1006, 1007, 1008, 5219, 10354, 16294, 3012, 8663, 8873, 2290, 1063, 2065, 1999, 1027, 1027, 9152, 2140, 1063, 2709, 9152, 2140, 1065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/legacy-cloud-providers/vsphere/vclib/utils.go
getAvailableSCSIController
func getAvailableSCSIController(scsiControllers []*types.VirtualController) *types.VirtualController { // get SCSI controller which has space for adding more devices for _, controller := range scsiControllers { if len(controller.Device) < SCSIControllerDeviceLimit { return controller } } return nil }
go
func getAvailableSCSIController(scsiControllers []*types.VirtualController) *types.VirtualController { // get SCSI controller which has space for adding more devices for _, controller := range scsiControllers { if len(controller.Device) < SCSIControllerDeviceLimit { return controller } } return nil }
[ "func", "getAvailableSCSIController", "(", "scsiControllers", "[", "]", "*", "types", ".", "VirtualController", ")", "*", "types", ".", "VirtualController", "{", "// get SCSI controller which has space for adding more devices", "for", "_", ",", "controller", ":=", "range"...
// getAvailableSCSIController gets available SCSI Controller from list of given controllers, which has less than 15 disk devices.
[ "getAvailableSCSIController", "gets", "available", "SCSI", "Controller", "from", "list", "of", "given", "controllers", "which", "has", "less", "than", "15", "disk", "devices", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/legacy-cloud-providers/vsphere/vclib/utils.go#L78-L86
train
getAvailableSCSIController returns the first SCSI controller which has space for adding more devices
[ 30522, 4569, 2278, 2131, 12462, 11733, 13510, 6169, 28524, 13181, 10820, 1006, 8040, 19570, 12162, 26611, 2015, 1031, 1033, 1008, 4127, 1012, 7484, 8663, 13181, 10820, 1007, 1008, 4127, 1012, 7484, 8663, 13181, 10820, 1063, 1013, 1013, 2131, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_mutatingwebhookconfiguration.go
Create
func (c *FakeMutatingWebhookConfigurations) Create(mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1beta1.Mut...
go
func (c *FakeMutatingWebhookConfigurations) Create(mutatingWebhookConfiguration *v1beta1.MutatingWebhookConfiguration) (result *v1beta1.MutatingWebhookConfiguration, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(mutatingwebhookconfigurationsResource, mutatingWebhookConfiguration), &v1beta1.Mut...
[ "func", "(", "c", "*", "FakeMutatingWebhookConfigurations", ")", "Create", "(", "mutatingWebhookConfiguration", "*", "v1beta1", ".", "MutatingWebhookConfiguration", ")", "(", "result", "*", "v1beta1", ".", "MutatingWebhookConfiguration", ",", "err", "error", ")", "{",...
// Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server's representation of the mutatingWebhookConfiguration, and an error, if there is any.
[ "Create", "takes", "the", "representation", "of", "a", "mutatingWebhookConfiguration", "and", "creates", "it", ".", "Returns", "the", "server", "s", "representation", "of", "the", "mutatingWebhookConfiguration", "and", "an", "error", "if", "there", "is", "any", "....
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/fake_mutatingwebhookconfiguration.go#L78-L85
train
Create takes the representation of a mutatingWebhookConfiguration and creates it. Returns the server s representation of the mutatingWebhookConfiguration and an error if there is any.
[ 30522, 4569, 2278, 1006, 1039, 1008, 8275, 28120, 5844, 8545, 23706, 14659, 8663, 8873, 27390, 10708, 1007, 3443, 1006, 14163, 29336, 2075, 8545, 23706, 14659, 8663, 8873, 27390, 3370, 1008, 1058, 2487, 20915, 27717, 1012, 14163, 29336, 2075,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/apiserver/pkg/registry/generic/storage_decorator.go
NewRawStorage
func NewRawStorage(config *storagebackend.Config) (storage.Interface, factory.DestroyFunc) { s, d, err := factory.Create(*config) if err != nil { klog.Fatalf("Unable to create storage backend: config (%v), err (%v)", config, err) } return s, d }
go
func NewRawStorage(config *storagebackend.Config) (storage.Interface, factory.DestroyFunc) { s, d, err := factory.Create(*config) if err != nil { klog.Fatalf("Unable to create storage backend: config (%v), err (%v)", config, err) } return s, d }
[ "func", "NewRawStorage", "(", "config", "*", "storagebackend", ".", "Config", ")", "(", "storage", ".", "Interface", ",", "factory", ".", "DestroyFunc", ")", "{", "s", ",", "d", ",", "err", ":=", "factory", ".", "Create", "(", "*", "config", ")", "\n",...
// NewRawStorage creates the low level kv storage. This is a work-around for current // two layer of same storage interface. // TODO: Once cacher is enabled on all registries (event registry is special), we will remove this method.
[ "NewRawStorage", "creates", "the", "low", "level", "kv", "storage", ".", "This", "is", "a", "work", "-", "around", "for", "current", "two", "layer", "of", "same", "storage", "interface", ".", "TODO", ":", "Once", "cacher", "is", "enabled", "on", "all", "...
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/apiserver/pkg/registry/generic/storage_decorator.go#L54-L60
train
NewRawStorage creates a new storage backend.
[ 30522, 4569, 2278, 2047, 2527, 9333, 4263, 4270, 1006, 9530, 8873, 2290, 1008, 5527, 5963, 10497, 1012, 9530, 8873, 2290, 1007, 1006, 5527, 1012, 8278, 1010, 4713, 1012, 6033, 11263, 12273, 1007, 1063, 1055, 1010, 1040, 1010, 9413, 2099, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/apimachinery/pkg/api/meta/multirestmapper.go
ResourceSingularizer
func (m MultiRESTMapper) ResourceSingularizer(resource string) (singular string, err error) { for _, t := range m { singular, err = t.ResourceSingularizer(resource) if err == nil { return } } return }
go
func (m MultiRESTMapper) ResourceSingularizer(resource string) (singular string, err error) { for _, t := range m { singular, err = t.ResourceSingularizer(resource) if err == nil { return } } return }
[ "func", "(", "m", "MultiRESTMapper", ")", "ResourceSingularizer", "(", "resource", "string", ")", "(", "singular", "string", ",", "err", "error", ")", "{", "for", "_", ",", "t", ":=", "range", "m", "{", "singular", ",", "err", "=", "t", ".", "ResourceS...
// ResourceSingularizer converts a REST resource name from plural to singular (e.g., from pods to pod) // This implementation supports multiple REST schemas and return the first match.
[ "ResourceSingularizer", "converts", "a", "REST", "resource", "name", "from", "plural", "to", "singular", "(", "e", ".", "g", ".", "from", "pods", "to", "pod", ")", "This", "implementation", "supports", "multiple", "REST", "schemas", "and", "return", "the", "...
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/apimachinery/pkg/api/meta/multirestmapper.go#L43-L51
train
ResourceSingularizer returns the singular form of the resource
[ 30522, 4569, 2278, 1006, 1049, 4800, 28533, 2863, 18620, 1007, 4219, 2075, 7934, 17629, 1006, 7692, 5164, 1007, 1006, 13048, 5164, 1010, 9413, 2099, 7561, 1007, 1063, 2005, 1035, 1010, 1056, 1024, 1027, 2846, 1049, 1063, 13048, 1010, 9413, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/kubectl/cmd/apiresources/apiversions.go
NewCmdAPIVersions
func NewCmdAPIVersions(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command { o := NewAPIVersionsOptions(ioStreams) cmd := &cobra.Command{ Use: "api-versions", Short: "Print the supported API versions on the server, in the form of \"group/version\"", Long: "Print the supported API v...
go
func NewCmdAPIVersions(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command { o := NewAPIVersionsOptions(ioStreams) cmd := &cobra.Command{ Use: "api-versions", Short: "Print the supported API versions on the server, in the form of \"group/version\"", Long: "Print the supported API v...
[ "func", "NewCmdAPIVersions", "(", "f", "cmdutil", ".", "Factory", ",", "ioStreams", "genericclioptions", ".", "IOStreams", ")", "*", "cobra", ".", "Command", "{", "o", ":=", "NewAPIVersionsOptions", "(", "ioStreams", ")", "\n", "cmd", ":=", "&", "cobra", "."...
// NewCmdAPIVersions creates the `api-versions` command
[ "NewCmdAPIVersions", "creates", "the", "api", "-", "versions", "command" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/kubectl/cmd/apiresources/apiversions.go#L54-L67
train
NewCmdAPIVersions returns a command to print the supported API versions on the server.
[ 30522, 4569, 2278, 2047, 27487, 2850, 8197, 27774, 2015, 1006, 1042, 4642, 8566, 3775, 2140, 1012, 4713, 1010, 16380, 25379, 2015, 12391, 20464, 3695, 16790, 2015, 1012, 16380, 25379, 2015, 1007, 1008, 16604, 1012, 3094, 1063, 1051, 1024, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go
DeepCopyObject
func (in *GetOptions) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil }
go
func (in *GetOptions) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil }
[ "func", "(", "in", "*", "GetOptions", ")", "DeepCopyObject", "(", ")", "runtime", ".", "Object", "{", "if", "c", ":=", "in", ".", "DeepCopy", "(", ")", ";", "c", "!=", "nil", "{", "return", "c", "\n", "}", "\n", "return", "nil", "\n", "}" ]
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
[ "DeepCopyObject", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "creating", "a", "new", "runtime", ".", "Object", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go#L356-L361
train
DeepCopyObject is an autogenerated deepcopy function copying the receiver creating a new GetOptions.
[ 30522, 4569, 2278, 1006, 1999, 1008, 2131, 7361, 9285, 1007, 2784, 3597, 7685, 16429, 20614, 1006, 1007, 2448, 7292, 1012, 4874, 1063, 2065, 1039, 1024, 1027, 1999, 1012, 2784, 3597, 7685, 1006, 1007, 1025, 1039, 999, 1027, 9152, 2140, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake/fake_customresourcedefinition.go
Get
func (c *FakeCustomResourceDefinitions) Get(name string, options v1.GetOptions) (result *apiextensions.CustomResourceDefinition, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(customresourcedefinitionsResource, name), &apiextensions.CustomResourceDefinition{}) if obj == nil { return nil, err }...
go
func (c *FakeCustomResourceDefinitions) Get(name string, options v1.GetOptions) (result *apiextensions.CustomResourceDefinition, err error) { obj, err := c.Fake. Invokes(testing.NewRootGetAction(customresourcedefinitionsResource, name), &apiextensions.CustomResourceDefinition{}) if obj == nil { return nil, err }...
[ "func", "(", "c", "*", "FakeCustomResourceDefinitions", ")", "Get", "(", "name", "string", ",", "options", "v1", ".", "GetOptions", ")", "(", "result", "*", "apiextensions", ".", "CustomResourceDefinition", ",", "err", "error", ")", "{", "obj", ",", "err", ...
// Get takes name of the customResourceDefinition, and returns the corresponding customResourceDefinition object, and an error if there is any.
[ "Get", "takes", "name", "of", "the", "customResourceDefinition", "and", "returns", "the", "corresponding", "customResourceDefinition", "object", "and", "an", "error", "if", "there", "is", "any", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/apiextensions-apiserver/pkg/client/clientset/internalclientset/typed/apiextensions/internalversion/fake/fake_customresourcedefinition.go#L41-L48
train
Get takes name of the customResourceDefinition and returns the corresponding customResourceDefinition object and an error if there is any.
[ 30522, 4569, 2278, 1006, 1039, 1008, 8275, 7874, 20389, 6072, 8162, 22119, 16294, 22753, 2015, 1007, 2131, 1006, 2171, 5164, 1010, 7047, 1058, 2487, 1012, 2131, 7361, 9285, 1007, 1006, 2765, 1008, 17928, 10288, 29048, 2015, 1012, 7661, 6072...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/apiserver/pkg/server/filters/content_type.go
WithContentType
func WithContentType(handler http.Handler, contentType string) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", contentType) w.Header().Set("X-Content-Type-Options", "nosniff") handler.ServeHTTP(w, r) }) }
go
func WithContentType(handler http.Handler, contentType string) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", contentType) w.Header().Set("X-Content-Type-Options", "nosniff") handler.ServeHTTP(w, r) }) }
[ "func", "WithContentType", "(", "handler", "http", ".", "Handler", ",", "contentType", "string", ")", "http", ".", "Handler", "{", "return", "http", ".", "HandlerFunc", "(", "func", "(", "w", "http", ".", "ResponseWriter", ",", "r", "*", "http", ".", "Re...
// WithContentType sets both the Content-Type and the X-Content-Type-Options (nosniff) header
[ "WithContentType", "sets", "both", "the", "Content", "-", "Type", "and", "the", "X", "-", "Content", "-", "Type", "-", "Options", "(", "nosniff", ")", "header" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/apiserver/pkg/server/filters/content_type.go#L22-L28
train
WithContentType returns a new http. Handler that sets the Content - Type header to contentType.
[ 30522, 4569, 2278, 2007, 8663, 6528, 15353, 5051, 1006, 28213, 8299, 1012, 28213, 1010, 4180, 13874, 5164, 1007, 8299, 1012, 28213, 1063, 2709, 8299, 1012, 28213, 11263, 12273, 1006, 4569, 2278, 1006, 1059, 8299, 1012, 3433, 15994, 1010, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/apiserver/pkg/registry/rest/update.go
DefaultUpdatedObjectInfo
func DefaultUpdatedObjectInfo(obj runtime.Object, transformers ...TransformFunc) UpdatedObjectInfo { return &defaultUpdatedObjectInfo{obj, transformers} }
go
func DefaultUpdatedObjectInfo(obj runtime.Object, transformers ...TransformFunc) UpdatedObjectInfo { return &defaultUpdatedObjectInfo{obj, transformers} }
[ "func", "DefaultUpdatedObjectInfo", "(", "obj", "runtime", ".", "Object", ",", "transformers", "...", "TransformFunc", ")", "UpdatedObjectInfo", "{", "return", "&", "defaultUpdatedObjectInfo", "{", "obj", ",", "transformers", "}", "\n", "}" ]
// DefaultUpdatedObjectInfo returns an UpdatedObjectInfo impl based on the specified object.
[ "DefaultUpdatedObjectInfo", "returns", "an", "UpdatedObjectInfo", "impl", "based", "on", "the", "specified", "object", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/apiserver/pkg/registry/rest/update.go#L170-L172
train
DefaultUpdatedObjectInfo returns a new UpdatedObjectInfo that can be used to store the object.
[ 30522, 4569, 2278, 12398, 6279, 13701, 3527, 2497, 20614, 2378, 14876, 1006, 27885, 3501, 2448, 7292, 1012, 4874, 1010, 19081, 1012, 1012, 1012, 10938, 11263, 12273, 1007, 7172, 16429, 20614, 2378, 14876, 1063, 2709, 1004, 12398, 6279, 13701,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/controller/volume/persistentvolume/scheduler_binder.go
arePodVolumesBound
func (b *volumeBinder) arePodVolumesBound(pod *v1.Pod) bool { for _, vol := range pod.Spec.Volumes { if isBound, _, _ := b.isVolumeBound(pod.Namespace, &vol); !isBound { // Pod has at least one PVC that needs binding return false } } return true }
go
func (b *volumeBinder) arePodVolumesBound(pod *v1.Pod) bool { for _, vol := range pod.Spec.Volumes { if isBound, _, _ := b.isVolumeBound(pod.Namespace, &vol); !isBound { // Pod has at least one PVC that needs binding return false } } return true }
[ "func", "(", "b", "*", "volumeBinder", ")", "arePodVolumesBound", "(", "pod", "*", "v1", ".", "Pod", ")", "bool", "{", "for", "_", ",", "vol", ":=", "range", "pod", ".", "Spec", ".", "Volumes", "{", "if", "isBound", ",", "_", ",", "_", ":=", "b",...
// arePodVolumesBound returns true if all volumes are fully bound
[ "arePodVolumesBound", "returns", "true", "if", "all", "volumes", "are", "fully", "bound" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/controller/volume/persistentvolume/scheduler_binder.go#L589-L597
train
arePodVolumesBound returns true if all volumes in the pod are bound
[ 30522, 4569, 2278, 1006, 1038, 1008, 3872, 8428, 4063, 1007, 2024, 27633, 6767, 12942, 2229, 15494, 1006, 17491, 1008, 1058, 2487, 1012, 17491, 1007, 22017, 2140, 1063, 2005, 1035, 1010, 5285, 1024, 1027, 2846, 17491, 1012, 28699, 1012, 670...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss.go
getVmssMachineID
func (az *Cloud) getVmssMachineID(resourceGroup, scaleSetName, instanceID string) string { return fmt.Sprintf( vmssMachineIDTemplate, az.SubscriptionID, strings.ToLower(resourceGroup), scaleSetName, instanceID) }
go
func (az *Cloud) getVmssMachineID(resourceGroup, scaleSetName, instanceID string) string { return fmt.Sprintf( vmssMachineIDTemplate, az.SubscriptionID, strings.ToLower(resourceGroup), scaleSetName, instanceID) }
[ "func", "(", "az", "*", "Cloud", ")", "getVmssMachineID", "(", "resourceGroup", ",", "scaleSetName", ",", "instanceID", "string", ")", "string", "{", "return", "fmt", ".", "Sprintf", "(", "vmssMachineIDTemplate", ",", "az", ".", "SubscriptionID", ",", "strings...
// getVmssMachineID returns the full identifier of a vmss virtual machine.
[ "getVmssMachineID", "returns", "the", "full", "identifier", "of", "a", "vmss", "virtual", "machine", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss.go#L354-L361
train
getVmssMachineID returns the machine ID for a VM.
[ 30522, 4569, 2278, 1006, 17207, 1008, 6112, 1007, 2131, 2615, 5244, 26212, 17231, 7416, 2094, 1006, 7692, 17058, 1010, 9539, 3388, 18442, 1010, 6013, 3593, 5164, 1007, 5164, 1063, 2709, 4718, 2102, 1012, 9043, 2546, 1006, 1058, 5244, 26212,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
third_party/forked/golang/expansion/expand.go
Expand
func Expand(input string, mapping func(string) string) string { var buf bytes.Buffer checkpoint := 0 for cursor := 0; cursor < len(input); cursor++ { if input[cursor] == operator && cursor+1 < len(input) { // Copy the portion of the input string since the last // checkpoint into the buffer buf.WriteString...
go
func Expand(input string, mapping func(string) string) string { var buf bytes.Buffer checkpoint := 0 for cursor := 0; cursor < len(input); cursor++ { if input[cursor] == operator && cursor+1 < len(input) { // Copy the portion of the input string since the last // checkpoint into the buffer buf.WriteString...
[ "func", "Expand", "(", "input", "string", ",", "mapping", "func", "(", "string", ")", "string", ")", "string", "{", "var", "buf", "bytes", ".", "Buffer", "\n", "checkpoint", ":=", "0", "\n", "for", "cursor", ":=", "0", ";", "cursor", "<", "len", "(",...
// Expand replaces variable references in the input string according to // the expansion spec using the given mapping function to resolve the // values of variables.
[ "Expand", "replaces", "variable", "references", "in", "the", "input", "string", "according", "to", "the", "expansion", "spec", "using", "the", "given", "mapping", "function", "to", "resolve", "the", "values", "of", "variables", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/third_party/forked/golang/expansion/expand.go#L38-L73
train
Expand expands the input string to a string that matches the operator and the mapping function.
[ 30522, 4569, 2278, 7818, 1006, 7953, 5164, 1010, 12375, 4569, 2278, 1006, 5164, 1007, 5164, 1007, 5164, 1063, 13075, 20934, 2546, 27507, 1012, 17698, 26520, 1024, 1027, 1014, 2005, 12731, 25301, 2099, 1024, 1027, 1014, 1025, 12731, 25301, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/volume/util/nsenter/nsenter_mount.go
doNsenterMount
func (n *Mounter) doNsenterMount(source, target, fstype string, options []string) error { klog.V(5).Infof("nsenter mount %s %s %s %v", source, target, fstype, options) cmd, args := n.makeNsenterArgs(source, target, fstype, options) outputBytes, err := n.ne.Exec(cmd, args).CombinedOutput() if len(outputBytes) != 0 {...
go
func (n *Mounter) doNsenterMount(source, target, fstype string, options []string) error { klog.V(5).Infof("nsenter mount %s %s %s %v", source, target, fstype, options) cmd, args := n.makeNsenterArgs(source, target, fstype, options) outputBytes, err := n.ne.Exec(cmd, args).CombinedOutput() if len(outputBytes) != 0 {...
[ "func", "(", "n", "*", "Mounter", ")", "doNsenterMount", "(", "source", ",", "target", ",", "fstype", "string", ",", "options", "[", "]", "string", ")", "error", "{", "klog", ".", "V", "(", "5", ")", ".", "Infof", "(", "\"", "\"", ",", "source", ...
// doNsenterMount nsenters the host's mount namespace and performs the // requested mount.
[ "doNsenterMount", "nsenters", "the", "host", "s", "mount", "namespace", "and", "performs", "the", "requested", "mount", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/volume/util/nsenter/nsenter_mount.go#L79-L87
train
doNsenterMount is a wrapper for doNsenterMount
[ 30522, 4569, 2278, 1006, 1050, 1008, 4057, 2121, 1007, 2123, 5054, 3334, 20048, 1006, 3120, 1010, 4539, 1010, 1042, 21756, 5051, 5164, 1010, 7047, 1031, 1033, 5164, 1007, 7561, 1063, 1047, 21197, 1012, 1058, 1006, 1019, 1007, 1012, 18558, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/util/filesystem/defaultfs.go
ReadDir
func (DefaultFs) ReadDir(dirname string) ([]os.FileInfo, error) { return ioutil.ReadDir(dirname) }
go
func (DefaultFs) ReadDir(dirname string) ([]os.FileInfo, error) { return ioutil.ReadDir(dirname) }
[ "func", "(", "DefaultFs", ")", "ReadDir", "(", "dirname", "string", ")", "(", "[", "]", "os", ".", "FileInfo", ",", "error", ")", "{", "return", "ioutil", ".", "ReadDir", "(", "dirname", ")", "\n", "}" ]
// ReadDir via ioutil.ReadDir
[ "ReadDir", "via", "ioutil", ".", "ReadDir" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/util/filesystem/defaultfs.go#L90-L92
train
ReadDir reads a directory and returns a slice of os. FileInfo objects.
[ 30522, 4569, 2278, 1006, 12398, 10343, 1007, 3191, 4305, 2099, 1006, 16101, 18442, 5164, 1007, 1006, 1031, 1033, 9808, 1012, 5371, 2378, 14876, 1010, 7561, 1007, 1063, 2709, 22834, 21823, 2140, 1012, 3191, 4305, 2099, 1006, 16101, 18442, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/legacy-cloud-providers/vsphere/vclib/volumeoptions.go
DiskformatValidOptions
func DiskformatValidOptions() string { validopts := "" for diskformat := range DiskFormatValidType { validopts += diskformat + ", " } validopts = strings.TrimSuffix(validopts, ", ") return validopts }
go
func DiskformatValidOptions() string { validopts := "" for diskformat := range DiskFormatValidType { validopts += diskformat + ", " } validopts = strings.TrimSuffix(validopts, ", ") return validopts }
[ "func", "DiskformatValidOptions", "(", ")", "string", "{", "validopts", ":=", "\"", "\"", "\n", "for", "diskformat", ":=", "range", "DiskFormatValidType", "{", "validopts", "+=", "diskformat", "+", "\"", "\"", "\n", "}", "\n", "validopts", "=", "strings", "....
// DiskformatValidOptions generates Valid Options for Diskformat
[ "DiskformatValidOptions", "generates", "Valid", "Options", "for", "Diskformat" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/legacy-cloud-providers/vsphere/vclib/volumeoptions.go#L51-L58
train
DiskformatValidOptions returns a string with the valid options for the diskformat
[ 30522, 4569, 2278, 9785, 14192, 4017, 10175, 13820, 16790, 2015, 1006, 1007, 5164, 1063, 9398, 7361, 3215, 1024, 1027, 1000, 1000, 2005, 9785, 14192, 4017, 1024, 1027, 2846, 9785, 14192, 4017, 10175, 3593, 13874, 1063, 9398, 7361, 3215, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/apis/core/zz_generated.deepcopy.go
DeepCopyObject
func (in *ServiceProxyOptions) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil }
go
func (in *ServiceProxyOptions) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil }
[ "func", "(", "in", "*", "ServiceProxyOptions", ")", "DeepCopyObject", "(", ")", "runtime", ".", "Object", "{", "if", "c", ":=", "in", ".", "DeepCopy", "(", ")", ";", "c", "!=", "nil", "{", "return", "c", "\n", "}", "\n", "return", "nil", "\n", "}" ...
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
[ "DeepCopyObject", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "creating", "a", "new", "runtime", ".", "Object", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/core/zz_generated.deepcopy.go#L4901-L4906
train
DeepCopyObject is an autogenerated deepcopy function copying the receiver creating a new runtime. Object.
[ 30522, 4569, 2278, 1006, 1999, 1008, 2326, 21572, 18037, 7361, 9285, 1007, 2784, 3597, 7685, 16429, 20614, 1006, 1007, 2448, 7292, 1012, 4874, 1063, 2065, 1039, 1024, 1027, 1999, 1012, 2784, 3597, 7685, 1006, 1007, 1025, 1039, 999, 1027, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/apiserver/pkg/apis/example/register.go
addKnownTypes
func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &Pod{}, &ReplicaSet{}, ) return nil }
go
func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &Pod{}, &ReplicaSet{}, ) return nil }
[ "func", "addKnownTypes", "(", "scheme", "*", "runtime", ".", "Scheme", ")", "error", "{", "scheme", ".", "AddKnownTypes", "(", "SchemeGroupVersion", ",", "&", "Pod", "{", "}", ",", "&", "ReplicaSet", "{", "}", ",", ")", "\n", "return", "nil", "\n", "}"...
// Adds the list of known types to the given scheme.
[ "Adds", "the", "list", "of", "known", "types", "to", "the", "given", "scheme", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/apiserver/pkg/apis/example/register.go#L46-L52
train
addKnownTypes adds the types of the cluster topology to the scheme.
[ 30522, 4569, 2278, 5587, 2243, 19779, 29405, 10374, 1006, 5679, 1008, 2448, 7292, 1012, 5679, 1007, 7561, 1063, 5679, 1012, 5587, 2243, 19779, 29405, 10374, 1006, 5679, 17058, 27774, 1010, 1004, 17491, 1063, 1065, 1010, 1004, 15059, 13462, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/api/apps/v1beta1/register.go
addKnownTypes
func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &Deployment{}, &DeploymentList{}, &DeploymentRollback{}, &Scale{}, &StatefulSet{}, &StatefulSetList{}, &ControllerRevision{}, &ControllerRevisionList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) ...
go
func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &Deployment{}, &DeploymentList{}, &DeploymentRollback{}, &Scale{}, &StatefulSet{}, &StatefulSetList{}, &ControllerRevision{}, &ControllerRevisionList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) ...
[ "func", "addKnownTypes", "(", "scheme", "*", "runtime", ".", "Scheme", ")", "error", "{", "scheme", ".", "AddKnownTypes", "(", "SchemeGroupVersion", ",", "&", "Deployment", "{", "}", ",", "&", "DeploymentList", "{", "}", ",", "&", "DeploymentRollback", "{", ...
// Adds the list of known types to the given scheme.
[ "Adds", "the", "list", "of", "known", "types", "to", "the", "given", "scheme", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/api/apps/v1beta1/register.go#L45-L58
train
addKnownTypes adds the types of the cluster cluster
[ 30522, 4569, 2278, 5587, 2243, 19779, 29405, 10374, 1006, 5679, 1008, 2448, 7292, 1012, 5679, 1007, 7561, 1063, 5679, 1012, 30524, 17058, 27774, 1010, 1004, 10813, 1063, 1065, 1010, 1004, 10813, 9863, 1063, 1065, 1010, 1004, 10813, 28402, 5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
cmd/kubeadm/app/cmd/config.go
NewCmdConfig
func NewCmdConfig(out io.Writer) *cobra.Command { var kubeConfigFile string cmd := &cobra.Command{ Use: "config", Short: "Manage configuration for a kubeadm cluster persisted in a ConfigMap in the cluster", Long: fmt.Sprintf(dedent.Dedent(` There is a ConfigMap in the %s namespace called %q that kubeadm u...
go
func NewCmdConfig(out io.Writer) *cobra.Command { var kubeConfigFile string cmd := &cobra.Command{ Use: "config", Short: "Manage configuration for a kubeadm cluster persisted in a ConfigMap in the cluster", Long: fmt.Sprintf(dedent.Dedent(` There is a ConfigMap in the %s namespace called %q that kubeadm u...
[ "func", "NewCmdConfig", "(", "out", "io", ".", "Writer", ")", "*", "cobra", ".", "Command", "{", "var", "kubeConfigFile", "string", "\n\n", "cmd", ":=", "&", "cobra", ".", "Command", "{", "Use", ":", "\"", "\"", ",", "Short", ":", "\"", "\"", ",", ...
// NewCmdConfig returns cobra.Command for "kubeadm config" command
[ "NewCmdConfig", "returns", "cobra", ".", "Command", "for", "kubeadm", "config", "command" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/cmd/kubeadm/app/cmd/config.go#L62-L91
train
NewCmdConfig returns a new command for config command
[ 30522, 4569, 2278, 2047, 27487, 16409, 2239, 8873, 2290, 1006, 2041, 22834, 1012, 3213, 1007, 1008, 16604, 1012, 3094, 1063, 13075, 13970, 4783, 8663, 8873, 25708, 9463, 5164, 4642, 2094, 1024, 1027, 1004, 16604, 1012, 3094, 1063, 2224, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/scheduler/core/extender.go
convertToNodeToVictims
func (h *HTTPExtender) convertToNodeToVictims( nodeNameToMetaVictims map[string]*schedulerapi.MetaVictims, nodeNameToInfo map[string]*schedulernodeinfo.NodeInfo, ) (map[*v1.Node]*schedulerapi.Victims, error) { nodeToVictims := map[*v1.Node]*schedulerapi.Victims{} for nodeName, metaVictims := range nodeNameToMetaVic...
go
func (h *HTTPExtender) convertToNodeToVictims( nodeNameToMetaVictims map[string]*schedulerapi.MetaVictims, nodeNameToInfo map[string]*schedulernodeinfo.NodeInfo, ) (map[*v1.Node]*schedulerapi.Victims, error) { nodeToVictims := map[*v1.Node]*schedulerapi.Victims{} for nodeName, metaVictims := range nodeNameToMetaVic...
[ "func", "(", "h", "*", "HTTPExtender", ")", "convertToNodeToVictims", "(", "nodeNameToMetaVictims", "map", "[", "string", "]", "*", "schedulerapi", ".", "MetaVictims", ",", "nodeNameToInfo", "map", "[", "string", "]", "*", "schedulernodeinfo", ".", "NodeInfo", "...
// convertToNodeToVictims converts "nodeNameToMetaVictims" from object identifiers, // such as UIDs and names, to object pointers.
[ "convertToNodeToVictims", "converts", "nodeNameToMetaVictims", "from", "object", "identifiers", "such", "as", "UIDs", "and", "names", "to", "object", "pointers", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/scheduler/core/extender.go#L180-L199
train
convertToNodeToVictims converts a map of metaVictims to a node to victims
[ 30522, 4569, 2278, 1006, 1044, 1008, 8299, 10288, 6528, 4063, 1007, 10463, 2669, 10244, 26525, 2594, 3775, 5244, 1006, 13045, 18442, 20389, 12928, 7903, 3775, 5244, 4949, 1031, 5164, 1033, 1008, 6134, 2527, 8197, 1012, 18804, 7903, 3775, 52...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/apis/core/v1/zz_generated.conversion.go
Convert_core_SecretVolumeSource_To_v1_SecretVolumeSource
func Convert_core_SecretVolumeSource_To_v1_SecretVolumeSource(in *core.SecretVolumeSource, out *v1.SecretVolumeSource, s conversion.Scope) error { return autoConvert_core_SecretVolumeSource_To_v1_SecretVolumeSource(in, out, s) }
go
func Convert_core_SecretVolumeSource_To_v1_SecretVolumeSource(in *core.SecretVolumeSource, out *v1.SecretVolumeSource, s conversion.Scope) error { return autoConvert_core_SecretVolumeSource_To_v1_SecretVolumeSource(in, out, s) }
[ "func", "Convert_core_SecretVolumeSource_To_v1_SecretVolumeSource", "(", "in", "*", "core", ".", "SecretVolumeSource", ",", "out", "*", "v1", ".", "SecretVolumeSource", ",", "s", "conversion", ".", "Scope", ")", "error", "{", "return", "autoConvert_core_SecretVolumeSour...
// Convert_core_SecretVolumeSource_To_v1_SecretVolumeSource is an autogenerated conversion function.
[ "Convert_core_SecretVolumeSource_To_v1_SecretVolumeSource", "is", "an", "autogenerated", "conversion", "function", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/core/v1/zz_generated.conversion.go#L6745-L6747
train
Convert_core_SecretVolumeSource_To_v1_SecretVolumeSource is an autogenerated conversion function.
[ 30522, 4569, 2278, 10463, 1035, 4563, 1035, 3595, 6767, 12942, 2229, 8162, 3401, 1035, 2000, 1035, 1058, 2487, 1035, 3595, 6767, 12942, 2229, 8162, 3401, 1006, 1999, 1008, 4563, 1012, 3595, 6767, 12942, 2229, 8162, 3401, 1010, 2041, 1008, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/kubectl/apply/strategy/replace_visitor.go
MergePrimitive
func (v replaceStrategy) MergePrimitive(e apply.PrimitiveElement) (apply.Result, error) { return v.doReplace(e) }
go
func (v replaceStrategy) MergePrimitive(e apply.PrimitiveElement) (apply.Result, error) { return v.doReplace(e) }
[ "func", "(", "v", "replaceStrategy", ")", "MergePrimitive", "(", "e", "apply", ".", "PrimitiveElement", ")", "(", "apply", ".", "Result", ",", "error", ")", "{", "return", "v", ".", "doReplace", "(", "e", ")", "\n", "}" ]
// MergePrimitive returns a result by merging the recorded, local and remote values // - replacing the remote value with the local value
[ "MergePrimitive", "returns", "a", "result", "by", "merging", "the", "recorded", "local", "and", "remote", "values", "-", "replacing", "the", "remote", "value", "with", "the", "local", "value" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/kubectl/apply/strategy/replace_visitor.go#L56-L58
train
MergePrimitive merges the primitive element e into a single result.
[ 30522, 4569, 2278, 1006, 1058, 20736, 6494, 2618, 6292, 1007, 13590, 18098, 27605, 6024, 1006, 1041, 6611, 1012, 10968, 12260, 3672, 1007, 1006, 6611, 1012, 2765, 1010, 7561, 1007, 1063, 2709, 1058, 1012, 2079, 2890, 24759, 10732, 1006, 104...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/controller/namespace/config/v1alpha1/conversion.go
Convert_v1alpha1_NamespaceControllerConfiguration_To_config_NamespaceControllerConfiguration
func Convert_v1alpha1_NamespaceControllerConfiguration_To_config_NamespaceControllerConfiguration(in *v1alpha1.NamespaceControllerConfiguration, out *config.NamespaceControllerConfiguration, s conversion.Scope) error { return autoConvert_v1alpha1_NamespaceControllerConfiguration_To_config_NamespaceControllerConfigurat...
go
func Convert_v1alpha1_NamespaceControllerConfiguration_To_config_NamespaceControllerConfiguration(in *v1alpha1.NamespaceControllerConfiguration, out *config.NamespaceControllerConfiguration, s conversion.Scope) error { return autoConvert_v1alpha1_NamespaceControllerConfiguration_To_config_NamespaceControllerConfigurat...
[ "func", "Convert_v1alpha1_NamespaceControllerConfiguration_To_config_NamespaceControllerConfiguration", "(", "in", "*", "v1alpha1", ".", "NamespaceControllerConfiguration", ",", "out", "*", "config", ".", "NamespaceControllerConfiguration", ",", "s", "conversion", ".", "Scope", ...
// Important! The public back-and-forth conversion functions for the types in this package // with NamespaceControllerConfiguration types need to be manually exposed like this in order for // other packages that reference this package to be able to call these conversion functions // in an autogenerated manner. // TODO:...
[ "Important!", "The", "public", "back", "-", "and", "-", "forth", "conversion", "functions", "for", "the", "types", "in", "this", "package", "with", "NamespaceControllerConfiguration", "types", "need", "to", "be", "manually", "exposed", "like", "this", "in", "ord...
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/controller/namespace/config/v1alpha1/conversion.go#L33-L35
train
Convert_v1alpha1_NamespaceControllerConfiguration_To_config_NamespaceControllerConfiguration is an autogenerated conversion function.
[ 30522, 4569, 2278, 10463, 1035, 1058, 2487, 2389, 21890, 2487, 1035, 3415, 15327, 8663, 13181, 10820, 8663, 8873, 27390, 3370, 1035, 2000, 1035, 9530, 8873, 2290, 1035, 3415, 15327, 8663, 13181, 10820, 8663, 8873, 27390, 3370, 1006, 1999, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/apis/core/v1/zz_generated.conversion.go
Convert_core_ResourceQuotaSpec_To_v1_ResourceQuotaSpec
func Convert_core_ResourceQuotaSpec_To_v1_ResourceQuotaSpec(in *core.ResourceQuotaSpec, out *v1.ResourceQuotaSpec, s conversion.Scope) error { return autoConvert_core_ResourceQuotaSpec_To_v1_ResourceQuotaSpec(in, out, s) }
go
func Convert_core_ResourceQuotaSpec_To_v1_ResourceQuotaSpec(in *core.ResourceQuotaSpec, out *v1.ResourceQuotaSpec, s conversion.Scope) error { return autoConvert_core_ResourceQuotaSpec_To_v1_ResourceQuotaSpec(in, out, s) }
[ "func", "Convert_core_ResourceQuotaSpec_To_v1_ResourceQuotaSpec", "(", "in", "*", "core", ".", "ResourceQuotaSpec", ",", "out", "*", "v1", ".", "ResourceQuotaSpec", ",", "s", "conversion", ".", "Scope", ")", "error", "{", "return", "autoConvert_core_ResourceQuotaSpec_To...
// Convert_core_ResourceQuotaSpec_To_v1_ResourceQuotaSpec is an autogenerated conversion function.
[ "Convert_core_ResourceQuotaSpec_To_v1_ResourceQuotaSpec", "is", "an", "autogenerated", "conversion", "function", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/core/v1/zz_generated.conversion.go#L6363-L6365
train
Convert_core_ResourceQuotaSpec_To_v1_ResourceQuotaSpec is an autogenerated conversion function.
[ 30522, 4569, 2278, 10463, 1035, 4563, 1035, 7692, 28940, 17287, 13102, 8586, 1035, 2000, 1035, 1058, 2487, 1035, 7692, 28940, 17287, 13102, 8586, 1006, 1999, 1008, 4563, 1012, 7692, 28940, 17287, 13102, 8586, 1010, 2041, 1008, 1058, 2487, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/metrics/pkg/apis/custom_metrics/v1beta2/zz_generated.conversion.go
Convert_custom_metrics_MetricListOptions_To_v1beta2_MetricListOptions
func Convert_custom_metrics_MetricListOptions_To_v1beta2_MetricListOptions(in *custommetrics.MetricListOptions, out *MetricListOptions, s conversion.Scope) error { return autoConvert_custom_metrics_MetricListOptions_To_v1beta2_MetricListOptions(in, out, s) }
go
func Convert_custom_metrics_MetricListOptions_To_v1beta2_MetricListOptions(in *custommetrics.MetricListOptions, out *MetricListOptions, s conversion.Scope) error { return autoConvert_custom_metrics_MetricListOptions_To_v1beta2_MetricListOptions(in, out, s) }
[ "func", "Convert_custom_metrics_MetricListOptions_To_v1beta2_MetricListOptions", "(", "in", "*", "custommetrics", ".", "MetricListOptions", ",", "out", "*", "MetricListOptions", ",", "s", "conversion", ".", "Scope", ")", "error", "{", "return", "autoConvert_custom_metrics_M...
// Convert_custom_metrics_MetricListOptions_To_v1beta2_MetricListOptions is an autogenerated conversion function.
[ "Convert_custom_metrics_MetricListOptions_To_v1beta2_MetricListOptions", "is", "an", "autogenerated", "conversion", "function", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/metrics/pkg/apis/custom_metrics/v1beta2/zz_generated.conversion.go#L122-L124
train
Convert_custom_metrics_MetricListOptions_To_v1beta2_MetricListOptions is an autogenerated conversion function.
[ 30522, 4569, 2278, 10463, 1035, 7661, 1035, 12046, 2015, 1035, 12046, 9863, 7361, 9285, 1035, 2000, 1035, 1058, 2487, 20915, 2050, 2475, 1035, 12046, 9863, 7361, 9285, 1006, 1999, 1008, 7661, 12589, 2015, 1012, 12046, 9863, 7361, 9285, 1010...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/apiserver/pkg/registry/rest/create.go
objectMetaAndKind
func objectMetaAndKind(typer runtime.ObjectTyper, obj runtime.Object) (metav1.Object, schema.GroupVersionKind, error) { objectMeta, err := meta.Accessor(obj) if err != nil { return nil, schema.GroupVersionKind{}, errors.NewInternalError(err) } kinds, _, err := typer.ObjectKinds(obj) if err != nil { return nil,...
go
func objectMetaAndKind(typer runtime.ObjectTyper, obj runtime.Object) (metav1.Object, schema.GroupVersionKind, error) { objectMeta, err := meta.Accessor(obj) if err != nil { return nil, schema.GroupVersionKind{}, errors.NewInternalError(err) } kinds, _, err := typer.ObjectKinds(obj) if err != nil { return nil,...
[ "func", "objectMetaAndKind", "(", "typer", "runtime", ".", "ObjectTyper", ",", "obj", "runtime", ".", "Object", ")", "(", "metav1", ".", "Object", ",", "schema", ".", "GroupVersionKind", ",", "error", ")", "{", "objectMeta", ",", "err", ":=", "meta", ".", ...
// objectMetaAndKind retrieves kind and ObjectMeta from a runtime object, or returns an error.
[ "objectMetaAndKind", "retrieves", "kind", "and", "ObjectMeta", "from", "a", "runtime", "object", "or", "returns", "an", "error", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/apiserver/pkg/registry/rest/create.go#L144-L154
train
objectMetaAndKind returns the object meta and kind of the object.
[ 30522, 4569, 2278, 4874, 11368, 14634, 2094, 18824, 1006, 2828, 2099, 2448, 7292, 1012, 4874, 13874, 2099, 1010, 27885, 3501, 2448, 7292, 1012, 4874, 1007, 1006, 18804, 2615, 2487, 1012, 4874, 1010, 8040, 28433, 1012, 2177, 27774, 18824, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/kubectl/cmd/attach/attach.go
GetContainerName
func (o *AttachOptions) GetContainerName(pod *corev1.Pod) (string, error) { c, err := o.containerToAttachTo(pod) if err != nil { return "", err } return c.Name, nil }
go
func (o *AttachOptions) GetContainerName(pod *corev1.Pod) (string, error) { c, err := o.containerToAttachTo(pod) if err != nil { return "", err } return c.Name, nil }
[ "func", "(", "o", "*", "AttachOptions", ")", "GetContainerName", "(", "pod", "*", "corev1", ".", "Pod", ")", "(", "string", ",", "error", ")", "{", "c", ",", "err", ":=", "o", ".", "containerToAttachTo", "(", "pod", ")", "\n", "if", "err", "!=", "n...
// GetContainerName returns the name of the container to attach to, with a fallback.
[ "GetContainerName", "returns", "the", "name", "of", "the", "container", "to", "attach", "to", "with", "a", "fallback", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/kubectl/cmd/attach/attach.go#L338-L344
train
GetContainerName returns the name of the container that is attached to the pod.
[ 30522, 4569, 2278, 1006, 1051, 1008, 22476, 7361, 9285, 1007, 2131, 30524, 3406, 1006, 17491, 1007, 2065, 9413, 2099, 999, 1027, 9152, 2140, 1063, 2709, 1000, 1000, 1010, 9413, 2099, 1065, 2709, 1039, 1012, 2171, 1010, 9152, 2140, 1065, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/apimachinery/pkg/runtime/register.go
GetObjectKind
func (obj *VersionedObjects) GetObjectKind() schema.ObjectKind { last := obj.Last() if last == nil { return schema.EmptyObjectKind } return last.GetObjectKind() }
go
func (obj *VersionedObjects) GetObjectKind() schema.ObjectKind { last := obj.Last() if last == nil { return schema.EmptyObjectKind } return last.GetObjectKind() }
[ "func", "(", "obj", "*", "VersionedObjects", ")", "GetObjectKind", "(", ")", "schema", ".", "ObjectKind", "{", "last", ":=", "obj", ".", "Last", "(", ")", "\n", "if", "last", "==", "nil", "{", "return", "schema", ".", "EmptyObjectKind", "\n", "}", "\n"...
// GetObjectKind implements Object for VersionedObjects, returning an empty ObjectKind // interface if no objects are provided, or the ObjectKind interface of the object in the // highest array position.
[ "GetObjectKind", "implements", "Object", "for", "VersionedObjects", "returning", "an", "empty", "ObjectKind", "interface", "if", "no", "objects", "are", "provided", "or", "the", "ObjectKind", "interface", "of", "the", "object", "in", "the", "highest", "array", "po...
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/apimachinery/pkg/runtime/register.go#L36-L42
train
GetObjectKind returns the object kind of the last object.
[ 30522, 4569, 2278, 1006, 27885, 3501, 1008, 2544, 26010, 2497, 20614, 2015, 1007, 2131, 16429, 20614, 18824, 1006, 1007, 8040, 28433, 1012, 4874, 18824, 1063, 2197, 1024, 1027, 27885, 3501, 1012, 2197, 1006, 1007, 2065, 2197, 1027, 1027, 91...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
cmd/kubeadm/app/apis/kubeadm/zz_generated.deepcopy.go
DeepCopy
func (in *HostPathMount) DeepCopy() *HostPathMount { if in == nil { return nil } out := new(HostPathMount) in.DeepCopyInto(out) return out }
go
func (in *HostPathMount) DeepCopy() *HostPathMount { if in == nil { return nil } out := new(HostPathMount) in.DeepCopyInto(out) return out }
[ "func", "(", "in", "*", "HostPathMount", ")", "DeepCopy", "(", ")", "*", "HostPathMount", "{", "if", "in", "==", "nil", "{", "return", "nil", "\n", "}", "\n", "out", ":=", "new", "(", "HostPathMount", ")", "\n", "in", ".", "DeepCopyInto", "(", "out",...
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostPathMount.
[ "DeepCopy", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "creating", "a", "new", "HostPathMount", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/cmd/kubeadm/app/apis/kubeadm/zz_generated.deepcopy.go#L394-L401
train
DeepCopy is an autogenerated deepcopy function copying the receiver creating a new HostPathMount.
[ 30522, 4569, 2278, 1006, 1999, 1008, 3677, 15069, 20048, 1007, 2784, 3597, 7685, 1006, 1007, 1008, 3677, 15069, 20048, 1063, 2065, 1999, 1027, 1027, 9152, 2140, 1063, 2709, 9152, 2140, 1065, 2041, 1024, 1027, 2047, 1006, 3677, 15069, 20048,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/legacy-cloud-providers/azure/azure_instances.go
NodeAddressesByProviderID
func (az *Cloud) NodeAddressesByProviderID(ctx context.Context, providerID string) ([]v1.NodeAddress, error) { // Returns nil for unmanaged nodes because azure cloud provider couldn't fetch information for them. if az.IsNodeUnmanagedByProviderID(providerID) { klog.V(4).Infof("NodeAddressesByProviderID: omitting unm...
go
func (az *Cloud) NodeAddressesByProviderID(ctx context.Context, providerID string) ([]v1.NodeAddress, error) { // Returns nil for unmanaged nodes because azure cloud provider couldn't fetch information for them. if az.IsNodeUnmanagedByProviderID(providerID) { klog.V(4).Infof("NodeAddressesByProviderID: omitting unm...
[ "func", "(", "az", "*", "Cloud", ")", "NodeAddressesByProviderID", "(", "ctx", "context", ".", "Context", ",", "providerID", "string", ")", "(", "[", "]", "v1", ".", "NodeAddress", ",", "error", ")", "{", "// Returns nil for unmanaged nodes because azure cloud pro...
// NodeAddressesByProviderID returns the node addresses of an instances with the specified unique providerID // This method will not be called from the node that is requesting this ID. i.e. metadata service // and other local methods cannot be used here
[ "NodeAddressesByProviderID", "returns", "the", "node", "addresses", "of", "an", "instances", "with", "the", "specified", "unique", "providerID", "This", "method", "will", "not", "be", "called", "from", "the", "node", "that", "is", "requesting", "this", "ID", "."...
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/legacy-cloud-providers/azure/azure_instances.go#L140-L153
train
NodeAddressesByProviderID returns a list of node addresses for a given providerID
[ 30522, 4569, 2278, 1006, 17207, 1008, 6112, 1007, 13045, 4215, 16200, 11393, 14478, 21572, 17258, 11124, 2094, 1006, 14931, 2595, 6123, 1012, 6123, 1010, 10802, 3593, 5164, 1007, 1006, 1031, 1033, 1058, 2487, 1012, 13045, 4215, 16200, 4757, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/proxy/apis/config/v1alpha1/zz_generated.conversion.go
Convert_config_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration
func Convert_config_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration(in *config.KubeProxyConfiguration, out *v1alpha1.KubeProxyConfiguration, s conversion.Scope) error { return autoConvert_config_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration(in, out, s) }
go
func Convert_config_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration(in *config.KubeProxyConfiguration, out *v1alpha1.KubeProxyConfiguration, s conversion.Scope) error { return autoConvert_config_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration(in, out, s) }
[ "func", "Convert_config_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration", "(", "in", "*", "config", ".", "KubeProxyConfiguration", ",", "out", "*", "v1alpha1", ".", "KubeProxyConfiguration", ",", "s", "conversion", ".", "Scope", ")", "error", "{", "return", "a...
// Convert_config_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration is an autogenerated conversion function.
[ "Convert_config_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration", "is", "an", "autogenerated", "conversion", "function", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/proxy/apis/config/v1alpha1/zz_generated.conversion.go#L166-L168
train
Convert_config_KubeProxyConfiguration_To_v1alpha1_KubeProxyConfiguration is an autogenerated conversion function.
[ 30522, 4569, 2278, 10463, 1035, 9530, 8873, 2290, 1035, 13970, 4783, 21572, 18037, 8663, 8873, 27390, 3370, 1035, 2000, 1035, 1058, 2487, 2389, 21890, 2487, 1035, 13970, 4783, 21572, 18037, 8663, 8873, 27390, 3370, 1006, 1999, 1008, 9530, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/cloud-provider/volume/helpers/rounding.go
RoundUpToMBInt
func RoundUpToMBInt(size resource.Quantity) (int, error) { requestBytes := size.Value() return roundUpSizeInt(requestBytes, MB) }
go
func RoundUpToMBInt(size resource.Quantity) (int, error) { requestBytes := size.Value() return roundUpSizeInt(requestBytes, MB) }
[ "func", "RoundUpToMBInt", "(", "size", "resource", ".", "Quantity", ")", "(", "int", ",", "error", ")", "{", "requestBytes", ":=", "size", ".", "Value", "(", ")", "\n", "return", "roundUpSizeInt", "(", "requestBytes", ",", "MB", ")", "\n", "}" ]
// RoundUpToMBInt rounds up given quantity to chunks of MB. It returns an // int instead of an int64 and an error if there's overflow
[ "RoundUpToMBInt", "rounds", "up", "given", "quantity", "to", "chunks", "of", "MB", ".", "It", "returns", "an", "int", "instead", "of", "an", "int64", "and", "an", "error", "if", "there", "s", "overflow" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/cloud-provider/volume/helpers/rounding.go#L94-L97
train
RoundUpToMBInt round up the given quantity to MB.
[ 30522, 4569, 2278, 2461, 29441, 5358, 8428, 2102, 1006, 2946, 7692, 1012, 11712, 1007, 1006, 20014, 1010, 7561, 1007, 1063, 5227, 3762, 4570, 1024, 1027, 2946, 1012, 3643, 1006, 1007, 2709, 2461, 22264, 4697, 18447, 1006, 5227, 3762, 4570, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/serviceaccount/jwt.go
JWTTokenGenerator
func JWTTokenGenerator(iss string, privateKey interface{}) (TokenGenerator, error) { var alg jose.SignatureAlgorithm switch pk := privateKey.(type) { case *rsa.PrivateKey: alg = jose.RS256 case *ecdsa.PrivateKey: switch pk.Curve { case elliptic.P256(): alg = jose.ES256 case elliptic.P384(): alg = jose...
go
func JWTTokenGenerator(iss string, privateKey interface{}) (TokenGenerator, error) { var alg jose.SignatureAlgorithm switch pk := privateKey.(type) { case *rsa.PrivateKey: alg = jose.RS256 case *ecdsa.PrivateKey: switch pk.Curve { case elliptic.P256(): alg = jose.ES256 case elliptic.P384(): alg = jose...
[ "func", "JWTTokenGenerator", "(", "iss", "string", ",", "privateKey", "interface", "{", "}", ")", "(", "TokenGenerator", ",", "error", ")", "{", "var", "alg", "jose", ".", "SignatureAlgorithm", "\n", "switch", "pk", ":=", "privateKey", ".", "(", "type", ")...
// JWTTokenGenerator returns a TokenGenerator that generates signed JWT tokens, using the given privateKey. // privateKey is a PEM-encoded byte array of a private RSA key. // JWTTokenAuthenticator()
[ "JWTTokenGenerator", "returns", "a", "TokenGenerator", "that", "generates", "signed", "JWT", "tokens", "using", "the", "given", "privateKey", ".", "privateKey", "is", "a", "PEM", "-", "encoded", "byte", "array", "of", "a", "private", "RSA", "key", ".", "JWTTok...
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/serviceaccount/jwt.go#L57-L93
train
JWTTokenGenerator returns a token generator for the given iss and private key.
[ 30522, 4569, 2278, 1046, 30524, 1063, 2553, 1008, 12667, 2050, 1012, 2797, 14839, 1024, 2632, 2290, 1027, 4560, 1012, 12667, 17788, 2575, 2553, 1008, 14925, 5104, 2050, 1012, 2797, 14839, 1024, 6942, 1052, 2243, 1012, 7774, 1063, 2553, 2941...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/security/podsecuritypolicy/provider.go
validateRuntimeClassName
func validateRuntimeClassName(actual *string, validNames []string) field.ErrorList { if actual == nil { return nil // An unset RuntimeClassName is always allowed. } for _, valid := range validNames { if valid == policy.AllowAllRuntimeClassNames { return nil } if *actual == valid { return nil } } r...
go
func validateRuntimeClassName(actual *string, validNames []string) field.ErrorList { if actual == nil { return nil // An unset RuntimeClassName is always allowed. } for _, valid := range validNames { if valid == policy.AllowAllRuntimeClassNames { return nil } if *actual == valid { return nil } } r...
[ "func", "validateRuntimeClassName", "(", "actual", "*", "string", ",", "validNames", "[", "]", "string", ")", "field", ".", "ErrorList", "{", "if", "actual", "==", "nil", "{", "return", "nil", "// An unset RuntimeClassName is always allowed.", "\n", "}", "\n\n", ...
// validates that the actual RuntimeClassName is contained in the list of valid names.
[ "validates", "that", "the", "actual", "RuntimeClassName", "is", "contained", "in", "the", "list", "of", "valid", "names", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/security/podsecuritypolicy/provider.go#L426-L440
train
validateRuntimeClassName validates the runtimeClassName
[ 30522, 4569, 2278, 9398, 24932, 16671, 14428, 26266, 18442, 1006, 5025, 1008, 5164, 1010, 9398, 18442, 2015, 1031, 1033, 5164, 1007, 2492, 1012, 7561, 9863, 1063, 2065, 5025, 1027, 1027, 9152, 2140, 1063, 2709, 9152, 2140, 1013, 1013, 2019,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/apiserver/pkg/server/mux/pathrecorder.go
NewPathRecorderMux
func NewPathRecorderMux(name string) *PathRecorderMux { ret := &PathRecorderMux{ name: name, pathToHandler: map[string]http.Handler{}, prefixToHandler: map[string]http.Handler{}, mux: atomic.Value{}, exposedPaths: []string{}, pathStacks: map[string]string{}, } ret.mux.St...
go
func NewPathRecorderMux(name string) *PathRecorderMux { ret := &PathRecorderMux{ name: name, pathToHandler: map[string]http.Handler{}, prefixToHandler: map[string]http.Handler{}, mux: atomic.Value{}, exposedPaths: []string{}, pathStacks: map[string]string{}, } ret.mux.St...
[ "func", "NewPathRecorderMux", "(", "name", "string", ")", "*", "PathRecorderMux", "{", "ret", ":=", "&", "PathRecorderMux", "{", "name", ":", "name", ",", "pathToHandler", ":", "map", "[", "string", "]", "http", ".", "Handler", "{", "}", ",", "prefixToHand...
// NewPathRecorderMux creates a new PathRecorderMux
[ "NewPathRecorderMux", "creates", "a", "new", "PathRecorderMux" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/apiserver/pkg/server/mux/pathrecorder.go#L83-L95
train
NewPathRecorderMux creates a new pathRecorderMux
[ 30522, 4569, 2278, 2047, 15069, 2890, 27108, 4063, 12274, 2595, 1006, 2171, 5164, 1007, 1008, 4130, 2890, 27108, 4063, 12274, 2595, 1063, 2128, 2102, 1024, 1027, 1004, 4130, 2890, 27108, 4063, 12274, 2595, 1063, 2171, 1024, 2171, 1010, 4130...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/apimachinery/pkg/runtime/codec.go
Encode
func Encode(e Encoder, obj Object) ([]byte, error) { // TODO: reuse buffer buf := &bytes.Buffer{} if err := e.Encode(obj, buf); err != nil { return nil, err } return buf.Bytes(), nil }
go
func Encode(e Encoder, obj Object) ([]byte, error) { // TODO: reuse buffer buf := &bytes.Buffer{} if err := e.Encode(obj, buf); err != nil { return nil, err } return buf.Bytes(), nil }
[ "func", "Encode", "(", "e", "Encoder", ",", "obj", "Object", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "// TODO: reuse buffer", "buf", ":=", "&", "bytes", ".", "Buffer", "{", "}", "\n", "if", "err", ":=", "e", ".", "Encode", "(", "obj", ...
// Encode is a convenience wrapper for encoding to a []byte from an Encoder
[ "Encode", "is", "a", "convenience", "wrapper", "for", "encoding", "to", "a", "[]", "byte", "from", "an", "Encoder" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/apimachinery/pkg/runtime/codec.go#L43-L50
train
Encode encodes the given object using the given Encoder.
[ 30522, 4569, 2278, 4372, 16044, 1006, 1041, 4372, 16044, 2099, 1010, 27885, 3501, 4874, 1007, 1006, 1031, 1033, 24880, 1010, 7561, 1007, 1063, 1013, 1013, 28681, 2080, 1024, 2128, 8557, 17698, 20934, 2546, 1024, 1027, 1004, 27507, 1012, 176...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/controller/volume/persistentvolume/config/v1alpha1/defaults.go
RecommendedDefaultVolumeConfiguration
func RecommendedDefaultVolumeConfiguration(obj *kubectrlmgrconfigv1alpha1.VolumeConfiguration) { if obj.EnableHostPathProvisioning == nil { obj.EnableHostPathProvisioning = utilpointer.BoolPtr(false) } if obj.EnableDynamicProvisioning == nil { obj.EnableDynamicProvisioning = utilpointer.BoolPtr(true) } if obj....
go
func RecommendedDefaultVolumeConfiguration(obj *kubectrlmgrconfigv1alpha1.VolumeConfiguration) { if obj.EnableHostPathProvisioning == nil { obj.EnableHostPathProvisioning = utilpointer.BoolPtr(false) } if obj.EnableDynamicProvisioning == nil { obj.EnableDynamicProvisioning = utilpointer.BoolPtr(true) } if obj....
[ "func", "RecommendedDefaultVolumeConfiguration", "(", "obj", "*", "kubectrlmgrconfigv1alpha1", ".", "VolumeConfiguration", ")", "{", "if", "obj", ".", "EnableHostPathProvisioning", "==", "nil", "{", "obj", ".", "EnableHostPathProvisioning", "=", "utilpointer", ".", "Boo...
// RecommendedDefaultVolumeConfiguration defaults a pointer to a VolumeConfiguration // struct. This will set the recommended default values, but they may be subject to // change between API versions. This function is intentionally not registered in the // scheme as a "normal" `SetDefaults_Foo` function to allow consum...
[ "RecommendedDefaultVolumeConfiguration", "defaults", "a", "pointer", "to", "a", "VolumeConfiguration", "struct", ".", "This", "will", "set", "the", "recommended", "default", "values", "but", "they", "may", "be", "subject", "to", "change", "between", "API", "versions...
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/controller/volume/persistentvolume/config/v1alpha1/defaults.go#L54-L66
train
RecommendedDefaultVolumeConfiguration is a convenience function to set the recommended default values for a VolumeConfiguration struct. This function is a utility function to set the recommended default values for a PersistentVolumeRecyclerConfiguration struct.
[ 30522, 4569, 2278, 6749, 3207, 7011, 11314, 6767, 12942, 8586, 2239, 8873, 27390, 3370, 1006, 27885, 3501, 1008, 13970, 4783, 6593, 12190, 24798, 29566, 2078, 8873, 2290, 2615, 2487, 2389, 21890, 2487, 1012, 3872, 8663, 8873, 27390, 3370, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/api/rbac/v1/zz_generated.deepcopy.go
DeepCopyInto
func (in *RoleList) DeepCopyInto(out *RoleList) { *out = *in out.TypeMeta = in.TypeMeta out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Role, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return }
go
func (in *RoleList) DeepCopyInto(out *RoleList) { *out = *in out.TypeMeta = in.TypeMeta out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Role, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return }
[ "func", "(", "in", "*", "RoleList", ")", "DeepCopyInto", "(", "out", "*", "RoleList", ")", "{", "*", "out", "=", "*", "in", "\n", "out", ".", "TypeMeta", "=", "in", ".", "TypeMeta", "\n", "out", ".", "ListMeta", "=", "in", ".", "ListMeta", "\n", ...
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
[ "DeepCopyInto", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "writing", "into", "out", ".", "in", "must", "be", "non", "-", "nil", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/api/rbac/v1/zz_generated.deepcopy.go#L327-L339
train
DeepCopyInto is an autogenerated deepcopy function copying the receiver creating a new RoleList.
[ 30522, 4569, 2278, 1006, 1999, 1008, 2535, 9863, 1007, 2784, 3597, 7685, 18447, 2080, 1006, 2041, 1008, 2535, 9863, 1007, 1063, 1008, 2041, 1027, 1008, 1999, 2041, 1012, 2828, 11368, 2050, 1027, 1999, 1012, 2828, 11368, 2050, 2041, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/controller/deployment/deployment_controller.go
getDeploymentsForReplicaSet
func (dc *DeploymentController) getDeploymentsForReplicaSet(rs *apps.ReplicaSet) []*apps.Deployment { deployments, err := dc.dLister.GetDeploymentsForReplicaSet(rs) if err != nil || len(deployments) == 0 { return nil } // Because all ReplicaSet's belonging to a deployment should have a unique label key, // there...
go
func (dc *DeploymentController) getDeploymentsForReplicaSet(rs *apps.ReplicaSet) []*apps.Deployment { deployments, err := dc.dLister.GetDeploymentsForReplicaSet(rs) if err != nil || len(deployments) == 0 { return nil } // Because all ReplicaSet's belonging to a deployment should have a unique label key, // there...
[ "func", "(", "dc", "*", "DeploymentController", ")", "getDeploymentsForReplicaSet", "(", "rs", "*", "apps", ".", "ReplicaSet", ")", "[", "]", "*", "apps", ".", "Deployment", "{", "deployments", ",", "err", ":=", "dc", ".", "dLister", ".", "GetDeploymentsForR...
// getDeploymentsForReplicaSet returns a list of Deployments that potentially // match a ReplicaSet.
[ "getDeploymentsForReplicaSet", "returns", "a", "list", "of", "Deployments", "that", "potentially", "match", "a", "ReplicaSet", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/controller/deployment/deployment_controller.go#L233-L249
train
getDeploymentsForReplicaSet returns a slice of Deployments for a replica set.
[ 30522, 4569, 2278, 1006, 5887, 1008, 10813, 8663, 13181, 10820, 1007, 2131, 3207, 24759, 6977, 8163, 29278, 2890, 24759, 5555, 13462, 1006, 12667, 1008, 18726, 1012, 15059, 13462, 1007, 1031, 1033, 1008, 18726, 1012, 10813, 1063, 10813, 2015,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/controller/resourcequota/config/zz_generated.deepcopy.go
DeepCopyInto
func (in *ResourceQuotaControllerConfiguration) DeepCopyInto(out *ResourceQuotaControllerConfiguration) { *out = *in out.ResourceQuotaSyncPeriod = in.ResourceQuotaSyncPeriod return }
go
func (in *ResourceQuotaControllerConfiguration) DeepCopyInto(out *ResourceQuotaControllerConfiguration) { *out = *in out.ResourceQuotaSyncPeriod = in.ResourceQuotaSyncPeriod return }
[ "func", "(", "in", "*", "ResourceQuotaControllerConfiguration", ")", "DeepCopyInto", "(", "out", "*", "ResourceQuotaControllerConfiguration", ")", "{", "*", "out", "=", "*", "in", "\n", "out", ".", "ResourceQuotaSyncPeriod", "=", "in", ".", "ResourceQuotaSyncPeriod"...
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
[ "DeepCopyInto", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "writing", "into", "out", ".", "in", "must", "be", "non", "-", "nil", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/controller/resourcequota/config/zz_generated.deepcopy.go#L24-L28
train
DeepCopyInto is an autogenerated deepcopy function copying the receiver creating a newResourceQuotaControllerConfiguration.
[ 30522, 4569, 2278, 1006, 1999, 1008, 7692, 28940, 17287, 8663, 13181, 10820, 8663, 8873, 27390, 3370, 1007, 2784, 3597, 7685, 18447, 2080, 1006, 2041, 1008, 7692, 28940, 17287, 8663, 13181, 10820, 8663, 8873, 27390, 3370, 1007, 1063, 1008, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/scheduler/algorithm/priorities/selector_spreading.go
CalculateSpreadPriorityReduce
func (s *SelectorSpread) CalculateSpreadPriorityReduce(pod *v1.Pod, meta interface{}, nodeNameToInfo map[string]*schedulernodeinfo.NodeInfo, result schedulerapi.HostPriorityList) error { countsByZone := make(map[string]int, 10) maxCountByZone := int(0) maxCountByNodeName := int(0) for i := range result { if resu...
go
func (s *SelectorSpread) CalculateSpreadPriorityReduce(pod *v1.Pod, meta interface{}, nodeNameToInfo map[string]*schedulernodeinfo.NodeInfo, result schedulerapi.HostPriorityList) error { countsByZone := make(map[string]int, 10) maxCountByZone := int(0) maxCountByNodeName := int(0) for i := range result { if resu...
[ "func", "(", "s", "*", "SelectorSpread", ")", "CalculateSpreadPriorityReduce", "(", "pod", "*", "v1", ".", "Pod", ",", "meta", "interface", "{", "}", ",", "nodeNameToInfo", "map", "[", "string", "]", "*", "schedulernodeinfo", ".", "NodeInfo", ",", "result", ...
// CalculateSpreadPriorityReduce calculates the source of each node // based on the number of existing matching pods on the node // where zone information is included on the nodes, it favors nodes // in zones with fewer existing matching pods.
[ "CalculateSpreadPriorityReduce", "calculates", "the", "source", "of", "each", "node", "based", "on", "the", "number", "of", "existing", "matching", "pods", "on", "the", "node", "where", "zone", "information", "is", "included", "on", "the", "nodes", "it", "favors...
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/scheduler/algorithm/priorities/selector_spreading.go#L99-L152
train
CalculateSpreadPriorityReduce calculates the spread priority reduce for the given pod.
[ 30522, 4569, 2278, 1006, 1055, 1008, 27000, 13102, 16416, 2094, 1007, 18422, 13102, 16416, 18927, 9488, 15780, 5596, 18796, 1006, 17491, 1008, 1058, 2487, 1012, 17491, 1010, 18804, 8278, 1063, 1065, 1010, 13045, 18442, 3406, 2378, 14876, 4949...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/util/ipset/ipset.go
ListEntries
func (runner *runner) ListEntries(set string) ([]string, error) { if len(set) == 0 { return nil, fmt.Errorf("set name can't be nil") } out, err := runner.exec.Command(IPSetCmd, "list", set).CombinedOutput() if err != nil { return nil, fmt.Errorf("error listing set: %s, error: %v", set, err) } memberMatcher :=...
go
func (runner *runner) ListEntries(set string) ([]string, error) { if len(set) == 0 { return nil, fmt.Errorf("set name can't be nil") } out, err := runner.exec.Command(IPSetCmd, "list", set).CombinedOutput() if err != nil { return nil, fmt.Errorf("error listing set: %s, error: %v", set, err) } memberMatcher :=...
[ "func", "(", "runner", "*", "runner", ")", "ListEntries", "(", "set", "string", ")", "(", "[", "]", "string", ",", "error", ")", "{", "if", "len", "(", "set", ")", "==", "0", "{", "return", "nil", ",", "fmt", ".", "Errorf", "(", "\"", "\"", ")"...
// ListEntries lists all the entries from a named set.
[ "ListEntries", "lists", "all", "the", "entries", "from", "a", "named", "set", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/util/ipset/ipset.go#L380-L398
train
ListEntries lists all entries in a set
[ 30522, 4569, 2278, 1006, 5479, 1008, 5479, 1007, 4952, 21011, 1006, 2275, 5164, 1007, 1006, 1031, 1033, 5164, 1010, 7561, 1007, 1063, 2065, 18798, 1006, 2275, 1007, 1027, 1027, 1014, 1063, 2709, 9152, 2140, 1010, 4718, 2102, 1012, 7561, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/kubectl/polymorphichelpers/logsforobject.go
logsForObjectWithClient
func logsForObjectWithClient(clientset corev1client.CoreV1Interface, object, options runtime.Object, timeout time.Duration, allContainers bool) ([]rest.ResponseWrapper, error) { opts, ok := options.(*corev1.PodLogOptions) if !ok { return nil, errors.New("provided options object is not a PodLogOptions") } switch ...
go
func logsForObjectWithClient(clientset corev1client.CoreV1Interface, object, options runtime.Object, timeout time.Duration, allContainers bool) ([]rest.ResponseWrapper, error) { opts, ok := options.(*corev1.PodLogOptions) if !ok { return nil, errors.New("provided options object is not a PodLogOptions") } switch ...
[ "func", "logsForObjectWithClient", "(", "clientset", "corev1client", ".", "CoreV1Interface", ",", "object", ",", "options", "runtime", ".", "Object", ",", "timeout", "time", ".", "Duration", ",", "allContainers", "bool", ")", "(", "[", "]", "rest", ".", "Respo...
// TODO: remove internal clientset once all callers use external versions // this is split for easy test-ability
[ "TODO", ":", "remove", "internal", "clientset", "once", "all", "callers", "use", "external", "versions", "this", "is", "split", "for", "easy", "test", "-", "ability" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/kubectl/polymorphichelpers/logsforobject.go#L50-L112
train
logsForObjectWithClient returns a list of logs for the given object.
[ 30522, 4569, 2278, 15664, 29278, 16429, 20614, 24415, 20464, 11638, 1006, 7846, 3388, 4563, 2615, 2487, 20464, 11638, 1012, 4563, 2615, 2487, 18447, 2121, 12172, 1010, 4874, 1010, 7047, 2448, 7292, 1012, 4874, 1010, 2051, 5833, 2051, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
cmd/kubeadm/app/phases/selfhosting/podspec_mutation.go
mutatePodSpec
func mutatePodSpec(mutators map[string][]PodSpecMutatorFunc, name string, podSpec *v1.PodSpec) { // Get the mutator functions for the component in question, then loop through and execute them mutatorsForComponent := mutators[name] for _, mutateFunc := range mutatorsForComponent { mutateFunc(podSpec) } }
go
func mutatePodSpec(mutators map[string][]PodSpecMutatorFunc, name string, podSpec *v1.PodSpec) { // Get the mutator functions for the component in question, then loop through and execute them mutatorsForComponent := mutators[name] for _, mutateFunc := range mutatorsForComponent { mutateFunc(podSpec) } }
[ "func", "mutatePodSpec", "(", "mutators", "map", "[", "string", "]", "[", "]", "PodSpecMutatorFunc", ",", "name", "string", ",", "podSpec", "*", "v1", ".", "PodSpec", ")", "{", "// Get the mutator functions for the component in question, then loop through and execute them...
// mutatePodSpec makes a Static Pod-hosted PodSpec suitable for self-hosting
[ "mutatePodSpec", "makes", "a", "Static", "Pod", "-", "hosted", "PodSpec", "suitable", "for", "self", "-", "hosting" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/cmd/kubeadm/app/phases/selfhosting/podspec_mutation.go#L77-L83
train
mutatePodSpec executes the mutator functions for the given component and podSpec.
[ 30522, 4569, 2278, 14163, 12259, 22925, 5051, 2278, 1006, 14163, 29336, 5668, 4949, 1031, 5164, 1033, 1031, 1033, 26723, 5051, 27487, 13210, 4263, 11263, 12273, 1010, 2171, 5164, 1010, 26723, 5051, 2278, 1008, 1058, 2487, 1012, 26723, 5051, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/apis/apps/zz_generated.deepcopy.go
DeepCopyInto
func (in *ReplicaSetStatus) DeepCopyInto(out *ReplicaSetStatus) { *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]ReplicaSetCondition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return }
go
func (in *ReplicaSetStatus) DeepCopyInto(out *ReplicaSetStatus) { *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]ReplicaSetCondition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return }
[ "func", "(", "in", "*", "ReplicaSetStatus", ")", "DeepCopyInto", "(", "out", "*", "ReplicaSetStatus", ")", "{", "*", "out", "=", "*", "in", "\n", "if", "in", ".", "Conditions", "!=", "nil", "{", "in", ",", "out", ":=", "&", "in", ".", "Conditions", ...
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
[ "DeepCopyInto", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "writing", "into", "out", ".", "in", "must", "be", "non", "-", "nil", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/apps/zz_generated.deepcopy.go#L546-L556
train
DeepCopyInto is an autogenerated deepcopy function copying the receiver creating a new ReplicaSetStatus.
[ 30522, 4569, 2278, 1006, 1999, 1008, 15059, 13462, 9153, 5809, 1007, 2784, 3597, 7685, 18447, 2080, 1006, 2041, 1008, 15059, 13462, 9153, 5809, 1007, 1063, 1008, 2041, 1027, 1008, 1999, 2065, 1999, 1012, 3785, 999, 1027, 9152, 2140, 1063, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csinode.go
Create
func (c *FakeCSINodes) Create(cSINode *v1beta1.CSINode) (result *v1beta1.CSINode, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(csinodesResource, cSINode), &v1beta1.CSINode{}) if obj == nil { return nil, err } return obj.(*v1beta1.CSINode), err }
go
func (c *FakeCSINodes) Create(cSINode *v1beta1.CSINode) (result *v1beta1.CSINode, err error) { obj, err := c.Fake. Invokes(testing.NewRootCreateAction(csinodesResource, cSINode), &v1beta1.CSINode{}) if obj == nil { return nil, err } return obj.(*v1beta1.CSINode), err }
[ "func", "(", "c", "*", "FakeCSINodes", ")", "Create", "(", "cSINode", "*", "v1beta1", ".", "CSINode", ")", "(", "result", "*", "v1beta1", ".", "CSINode", ",", "err", "error", ")", "{", "obj", ",", "err", ":=", "c", ".", "Fake", ".", "Invokes", "(",...
// Create takes the representation of a cSINode and creates it. Returns the server's representation of the cSINode, and an error, if there is any.
[ "Create", "takes", "the", "representation", "of", "a", "cSINode", "and", "creates", "it", ".", "Returns", "the", "server", "s", "representation", "of", "the", "cSINode", "and", "an", "error", "if", "there", "is", "any", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/client-go/kubernetes/typed/storage/v1beta1/fake/fake_csinode.go#L78-L85
train
Create takes the representation of a cSINode and creates it. Returns the server s representation of the cSINode and an error if there is any.
[ 30522, 4569, 2278, 1006, 1039, 1008, 8275, 6169, 5740, 6155, 1007, 3443, 1006, 22174, 3630, 3207, 1008, 1058, 2487, 20915, 27717, 1012, 22174, 3630, 3207, 1007, 1006, 2765, 1008, 1058, 2487, 20915, 27717, 1012, 22174, 3630, 3207, 1010, 9413...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
plugin/pkg/admission/gc/gc_admission.go
ownerRefToDeleteAttributeRecords
func (a *gcPermissionsEnforcement) ownerRefToDeleteAttributeRecords(ref metav1.OwnerReference, attributes admission.Attributes) ([]authorizer.AttributesRecord, error) { var ret []authorizer.AttributesRecord groupVersion, err := schema.ParseGroupVersion(ref.APIVersion) if err != nil { return ret, err } mappings, ...
go
func (a *gcPermissionsEnforcement) ownerRefToDeleteAttributeRecords(ref metav1.OwnerReference, attributes admission.Attributes) ([]authorizer.AttributesRecord, error) { var ret []authorizer.AttributesRecord groupVersion, err := schema.ParseGroupVersion(ref.APIVersion) if err != nil { return ret, err } mappings, ...
[ "func", "(", "a", "*", "gcPermissionsEnforcement", ")", "ownerRefToDeleteAttributeRecords", "(", "ref", "metav1", ".", "OwnerReference", ",", "attributes", "admission", ".", "Attributes", ")", "(", "[", "]", "authorizer", ".", "AttributesRecord", ",", "error", ")"...
// Translates ref to a DeleteAttribute deleting the object referred by the ref. // OwnerReference only records the object kind, which might map to multiple // resources, so multiple DeleteAttribute might be returned.
[ "Translates", "ref", "to", "a", "DeleteAttribute", "deleting", "the", "object", "referred", "by", "the", "ref", ".", "OwnerReference", "only", "records", "the", "object", "kind", "which", "might", "map", "to", "multiple", "resources", "so", "multiple", "DeleteAt...
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/plugin/pkg/admission/gc/gc_admission.go#L178-L207
train
ownerRefToDeleteAttributeRecords returns a list of AttributesRecord for the given ownerRef.
[ 30522, 4569, 2278, 1006, 1037, 1008, 1043, 21906, 2121, 25481, 5054, 14821, 3672, 1007, 3954, 2890, 6199, 10244, 25890, 19321, 3089, 8569, 3334, 8586, 8551, 2015, 1006, 25416, 18804, 2615, 2487, 1012, 3954, 2890, 25523, 1010, 12332, 9634, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/kubelet/volumemanager/reconciler/reconciler.go
NewReconciler
func NewReconciler( kubeClient clientset.Interface, controllerAttachDetachEnabled bool, loopSleepDuration time.Duration, waitForAttachTimeout time.Duration, nodeName types.NodeName, desiredStateOfWorld cache.DesiredStateOfWorld, actualStateOfWorld cache.ActualStateOfWorld, populatorHasAddedPods func() bool, op...
go
func NewReconciler( kubeClient clientset.Interface, controllerAttachDetachEnabled bool, loopSleepDuration time.Duration, waitForAttachTimeout time.Duration, nodeName types.NodeName, desiredStateOfWorld cache.DesiredStateOfWorld, actualStateOfWorld cache.ActualStateOfWorld, populatorHasAddedPods func() bool, op...
[ "func", "NewReconciler", "(", "kubeClient", "clientset", ".", "Interface", ",", "controllerAttachDetachEnabled", "bool", ",", "loopSleepDuration", "time", ".", "Duration", ",", "waitForAttachTimeout", "time", ".", "Duration", ",", "nodeName", "types", ".", "NodeName",...
// NewReconciler returns a new instance of Reconciler. // // controllerAttachDetachEnabled - if true, indicates that the attach/detach // controller is responsible for managing the attach/detach operations for // this node, and therefore the volume manager should not // loopSleepDuration - the amount of time the re...
[ "NewReconciler", "returns", "a", "new", "instance", "of", "Reconciler", ".", "controllerAttachDetachEnabled", "-", "if", "true", "indicates", "that", "the", "attach", "/", "detach", "controller", "is", "responsible", "for", "managing", "the", "attach", "/", "detac...
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/kubelet/volumemanager/reconciler/reconciler.go#L91-L119
train
NewReconciler returns a new instance of a new recoiler
[ 30522, 4569, 2278, 2047, 2890, 8663, 6895, 3917, 1006, 13970, 4783, 20464, 11638, 7846, 3388, 1012, 8278, 1010, 11486, 19321, 6776, 3207, 2696, 8661, 3085, 2094, 22017, 2140, 1010, 15932, 10559, 17299, 18924, 2051, 1012, 9367, 1010, 3524, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/kubectl/cmd/drain/drain.go
RunCordonOrUncordon
func (o *DrainCmdOptions) RunCordonOrUncordon(desired bool) error { cordonOrUncordon := "cordon" if !desired { cordonOrUncordon = "un" + cordonOrUncordon } for _, nodeInfo := range o.nodeInfos { printError := func(err error) { fmt.Fprintf(o.ErrOut, "error: unable to %s node %q: %v\n", cordonOrUncordon, nod...
go
func (o *DrainCmdOptions) RunCordonOrUncordon(desired bool) error { cordonOrUncordon := "cordon" if !desired { cordonOrUncordon = "un" + cordonOrUncordon } for _, nodeInfo := range o.nodeInfos { printError := func(err error) { fmt.Fprintf(o.ErrOut, "error: unable to %s node %q: %v\n", cordonOrUncordon, nod...
[ "func", "(", "o", "*", "DrainCmdOptions", ")", "RunCordonOrUncordon", "(", "desired", "bool", ")", "error", "{", "cordonOrUncordon", ":=", "\"", "\"", "\n", "if", "!", "desired", "{", "cordonOrUncordon", "=", "\"", "\"", "+", "cordonOrUncordon", "\n", "}", ...
// RunCordonOrUncordon runs either Cordon or Uncordon. The desired value for // "Unschedulable" is passed as the first arg.
[ "RunCordonOrUncordon", "runs", "either", "Cordon", "or", "Uncordon", ".", "The", "desired", "value", "for", "Unschedulable", "is", "passed", "as", "the", "first", "arg", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/kubectl/cmd/drain/drain.go#L463-L519
train
RunCordonOrUncordon runs the cordon or uncordon command
[ 30522, 4569, 2278, 1006, 1051, 1008, 12475, 27487, 3527, 16790, 2015, 1007, 2448, 27108, 5280, 2953, 4609, 27108, 5280, 1006, 9059, 22017, 2140, 1007, 7561, 1063, 11601, 17175, 15532, 27108, 5280, 1024, 1027, 1000, 11601, 2239, 1000, 2065, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
pkg/kubelet/dockershim/docker_service.go
getDockerVersion
func (ds *dockerService) getDockerVersion() (*dockertypes.Version, error) { v, err := ds.client.Version() if err != nil { return nil, fmt.Errorf("failed to get docker version: %v", err) } // Docker API version (e.g., 1.23) is not semver compatible. Add a ".0" // suffix to remedy this. v.APIVersion = fmt.Sprintf...
go
func (ds *dockerService) getDockerVersion() (*dockertypes.Version, error) { v, err := ds.client.Version() if err != nil { return nil, fmt.Errorf("failed to get docker version: %v", err) } // Docker API version (e.g., 1.23) is not semver compatible. Add a ".0" // suffix to remedy this. v.APIVersion = fmt.Sprintf...
[ "func", "(", "ds", "*", "dockerService", ")", "getDockerVersion", "(", ")", "(", "*", "dockertypes", ".", "Version", ",", "error", ")", "{", "v", ",", "err", ":=", "ds", ".", "client", ".", "Version", "(", ")", "\n", "if", "err", "!=", "nil", "{", ...
// getDockerVersion gets the version information from docker.
[ "getDockerVersion", "gets", "the", "version", "information", "from", "docker", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/kubelet/dockershim/docker_service.go#L335-L344
train
getDockerVersion returns the docker version
[ 30522, 4569, 2278, 1006, 16233, 1008, 8946, 2545, 2121, 7903, 2063, 1007, 2131, 14647, 2121, 27774, 1006, 1007, 1006, 1008, 8946, 15010, 10374, 1012, 2544, 1010, 7561, 1007, 1063, 1058, 1010, 9413, 2099, 1024, 1027, 16233, 1012, 7396, 1012,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util.go
getSharedDatastoresInK8SCluster
func getSharedDatastoresInK8SCluster(ctx context.Context, dc *vclib.Datacenter, nodeManager *NodeManager) ([]*vclib.DatastoreInfo, error) { nodeVmDetails, err := nodeManager.GetNodeDetails() if err != nil { klog.Errorf("Error while obtaining Kubernetes node nodeVmDetail details. error : %+v", err) return nil, err...
go
func getSharedDatastoresInK8SCluster(ctx context.Context, dc *vclib.Datacenter, nodeManager *NodeManager) ([]*vclib.DatastoreInfo, error) { nodeVmDetails, err := nodeManager.GetNodeDetails() if err != nil { klog.Errorf("Error while obtaining Kubernetes node nodeVmDetail details. error : %+v", err) return nil, err...
[ "func", "getSharedDatastoresInK8SCluster", "(", "ctx", "context", ".", "Context", ",", "dc", "*", "vclib", ".", "Datacenter", ",", "nodeManager", "*", "NodeManager", ")", "(", "[", "]", "*", "vclib", ".", "DatastoreInfo", ",", "error", ")", "{", "nodeVmDetai...
// Get all datastores accessible for the virtual machine object.
[ "Get", "all", "datastores", "accessible", "for", "the", "virtual", "machine", "object", "." ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/legacy-cloud-providers/vsphere/vsphere_util.go#L124-L165
train
getSharedDatastoresInK8SCluster returns a list of shared datastores in the Kubernetes cluster
[ 30522, 4569, 2278, 4152, 8167, 22367, 6790, 23809, 2229, 19839, 2620, 11020, 7393, 3334, 1006, 14931, 2595, 6123, 1012, 6123, 1010, 5887, 1008, 18315, 29521, 1012, 2951, 13013, 2121, 1010, 13045, 24805, 4590, 1008, 13045, 24805, 4590, 1007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
cmd/kubeadm/app/cmd/alpha/kubelet.go
newCmdKubeletConfig
func newCmdKubeletConfig() *cobra.Command { cmd := &cobra.Command{ Use: "config", Short: "Utilities for kubelet configuration", Long: cmdutil.MacroCommandLongDescription, } cmd.AddCommand(newCmdKubeletConfigDownload()) cmd.AddCommand(newCmdKubeletConfigEnableDynamic()) return cmd }
go
func newCmdKubeletConfig() *cobra.Command { cmd := &cobra.Command{ Use: "config", Short: "Utilities for kubelet configuration", Long: cmdutil.MacroCommandLongDescription, } cmd.AddCommand(newCmdKubeletConfigDownload()) cmd.AddCommand(newCmdKubeletConfigEnableDynamic()) return cmd }
[ "func", "newCmdKubeletConfig", "(", ")", "*", "cobra", ".", "Command", "{", "cmd", ":=", "&", "cobra", ".", "Command", "{", "Use", ":", "\"", "\"", ",", "Short", ":", "\"", "\"", ",", "Long", ":", "cmdutil", ".", "MacroCommandLongDescription", ",", "}"...
// newCmdKubeletConfig returns command for `kubeadm phase kubelet config`
[ "newCmdKubeletConfig", "returns", "command", "for", "kubeadm", "phase", "kubelet", "config" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/cmd/kubeadm/app/cmd/alpha/kubelet.go#L82-L92
train
newCmdKubeletConfig returns a new command for kubelet config
[ 30522, 4569, 2278, 2047, 27487, 2094, 5283, 8671, 3388, 8663, 8873, 2290, 1006, 1007, 1008, 16604, 1012, 3094, 1063, 4642, 2094, 1024, 1027, 1004, 16604, 1012, 3094, 1063, 2224, 1024, 1000, 9530, 8873, 2290, 1000, 1010, 2460, 1024, 1000, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
kubernetes/kubernetes
staging/src/k8s.io/apiserver/pkg/audit/policy/dynamic.go
ConvertDynamicPolicyToInternal
func ConvertDynamicPolicyToInternal(p *v1alpha1.Policy) *audit.Policy { stages := make([]audit.Stage, len(p.Stages)) for i, stage := range p.Stages { stages[i] = audit.Stage(stage) } return &audit.Policy{ Rules: []audit.PolicyRule{ { Level: audit.Level(p.Level), }, }, OmitStages: InvertStages(stag...
go
func ConvertDynamicPolicyToInternal(p *v1alpha1.Policy) *audit.Policy { stages := make([]audit.Stage, len(p.Stages)) for i, stage := range p.Stages { stages[i] = audit.Stage(stage) } return &audit.Policy{ Rules: []audit.PolicyRule{ { Level: audit.Level(p.Level), }, }, OmitStages: InvertStages(stag...
[ "func", "ConvertDynamicPolicyToInternal", "(", "p", "*", "v1alpha1", ".", "Policy", ")", "*", "audit", ".", "Policy", "{", "stages", ":=", "make", "(", "[", "]", "audit", ".", "Stage", ",", "len", "(", "p", ".", "Stages", ")", ")", "\n", "for", "i", ...
// ConvertDynamicPolicyToInternal constructs an internal policy type from a // v1alpha1 dynamic type
[ "ConvertDynamicPolicyToInternal", "constructs", "an", "internal", "policy", "type", "from", "a", "v1alpha1", "dynamic", "type" ]
6a8a3682919652ae668c389ed2f60efb770eed03
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/apiserver/pkg/audit/policy/dynamic.go#L27-L40
train
ConvertDynamicPolicyToInternal converts a dynamic policy to an internal policy.
[ 30522, 4569, 2278, 10463, 5149, 28987, 21906, 23518, 22123, 25785, 11795, 2389, 1006, 1052, 1008, 1058, 2487, 2389, 21890, 2487, 1012, 3343, 1007, 30524, 1052, 1012, 5711, 1007, 1007, 2005, 1045, 1010, 2754, 1024, 1027, 2846, 1052, 1012, 57...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...