Dataset Viewer
Auto-converted to Parquet Duplicate
repository_name
stringlengths
5
48
func_path_in_repository
stringlengths
4
155
func_name
stringlengths
1
118
whole_func_string
stringlengths
52
3.87M
language
stringclasses
1 value
func_code_string
stringlengths
52
3.87M
func_code_tokens
sequencelengths
21
188k
func_documentation_string
stringlengths
31
26.3k
func_documentation_tokens
sequencelengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
252
kubernetes/kubernetes
staging/src/k8s.io/apimachinery/pkg/runtime/extension.go
MarshalJSON
func (re RawExtension) MarshalJSON() ([]byte, error) { if re.Raw == nil { // TODO: this is to support legacy behavior of JSONPrinter and YAMLPrinter, which // expect to call json.Marshal on arbitrary versioned objects (even those not in // the scheme). pkg/kubectl/resource#AsVersionedObjects and its interaction ...
go
func (re RawExtension) MarshalJSON() ([]byte, error) { if re.Raw == nil { // TODO: this is to support legacy behavior of JSONPrinter and YAMLPrinter, which // expect to call json.Marshal on arbitrary versioned objects (even those not in // the scheme). pkg/kubectl/resource#AsVersionedObjects and its interaction ...
[ "func", "(", "re", "RawExtension", ")", "MarshalJSON", "(", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "if", "re", ".", "Raw", "==", "nil", "{", "// TODO: this is to support legacy behavior of JSONPrinter and YAMLPrinter, which", "// expect to call json.Marsh...
// MarshalJSON may get called on pointers or values, so implement MarshalJSON on value. // http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go
[ "MarshalJSON", "may", "get", "called", "on", "pointers", "or", "values", "so", "implement", "MarshalJSON", "on", "value", ".", "http", ":", "//", "stackoverflow", ".", "com", "/", "questions", "/", "21390979", "/", "custom", "-", "marshaljson", "-", "never",...
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/apimachinery/pkg/runtime/extension.go#L37-L51
kubernetes/kubernetes
staging/src/k8s.io/client-go/tools/clientcmd/validation.go
IsContextNotFound
func IsContextNotFound(err error) bool { if err == nil { return false } if _, ok := err.(*errContextNotFound); ok || err == ErrNoContext { return true } return strings.Contains(err.Error(), "context was not found for specified context") }
go
func IsContextNotFound(err error) bool { if err == nil { return false } if _, ok := err.(*errContextNotFound); ok || err == ErrNoContext { return true } return strings.Contains(err.Error(), "context was not found for specified context") }
[ "func", "IsContextNotFound", "(", "err", "error", ")", "bool", "{", "if", "err", "==", "nil", "{", "return", "false", "\n", "}", "\n", "if", "_", ",", "ok", ":=", "err", ".", "(", "*", "errContextNotFound", ")", ";", "ok", "||", "err", "==", "ErrNo...
// IsContextNotFound returns a boolean indicating whether the error is known to // report that a context was not found
[ "IsContextNotFound", "returns", "a", "boolean", "indicating", "whether", "the", "error", "is", "known", "to", "report", "that", "a", "context", "was", "not", "found" ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/client-go/tools/clientcmd/validation.go#L48-L56
kubernetes/kubernetes
staging/src/k8s.io/client-go/tools/clientcmd/validation.go
IsEmptyConfig
func IsEmptyConfig(err error) bool { switch t := err.(type) { case errConfigurationInvalid: return len(t) == 1 && t[0] == ErrEmptyConfig } return err == ErrEmptyConfig }
go
func IsEmptyConfig(err error) bool { switch t := err.(type) { case errConfigurationInvalid: return len(t) == 1 && t[0] == ErrEmptyConfig } return err == ErrEmptyConfig }
[ "func", "IsEmptyConfig", "(", "err", "error", ")", "bool", "{", "switch", "t", ":=", "err", ".", "(", "type", ")", "{", "case", "errConfigurationInvalid", ":", "return", "len", "(", "t", ")", "==", "1", "&&", "t", "[", "0", "]", "==", "ErrEmptyConfig...
// IsEmptyConfig returns true if the provided error indicates the provided configuration // is empty.
[ "IsEmptyConfig", "returns", "true", "if", "the", "provided", "error", "indicates", "the", "provided", "configuration", "is", "empty", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/client-go/tools/clientcmd/validation.go#L60-L66
kubernetes/kubernetes
staging/src/k8s.io/client-go/tools/clientcmd/validation.go
IsConfigurationInvalid
func IsConfigurationInvalid(err error) bool { switch err.(type) { case *errContextNotFound, errConfigurationInvalid: return true } return IsContextNotFound(err) }
go
func IsConfigurationInvalid(err error) bool { switch err.(type) { case *errContextNotFound, errConfigurationInvalid: return true } return IsContextNotFound(err) }
[ "func", "IsConfigurationInvalid", "(", "err", "error", ")", "bool", "{", "switch", "err", ".", "(", "type", ")", "{", "case", "*", "errContextNotFound", ",", "errConfigurationInvalid", ":", "return", "true", "\n", "}", "\n", "return", "IsContextNotFound", "(",...
// IsConfigurationInvalid returns true if the provided error indicates the configuration is invalid.
[ "IsConfigurationInvalid", "returns", "true", "if", "the", "provided", "error", "indicates", "the", "configuration", "is", "invalid", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/client-go/tools/clientcmd/validation.go#L95-L101
kubernetes/kubernetes
staging/src/k8s.io/client-go/tools/clientcmd/validation.go
Validate
func Validate(config clientcmdapi.Config) error { validationErrors := make([]error, 0) if clientcmdapi.IsConfigEmpty(&config) { return newErrConfigurationInvalid([]error{ErrEmptyConfig}) } if len(config.CurrentContext) != 0 { if _, exists := config.Contexts[config.CurrentContext]; !exists { validationError...
go
func Validate(config clientcmdapi.Config) error { validationErrors := make([]error, 0) if clientcmdapi.IsConfigEmpty(&config) { return newErrConfigurationInvalid([]error{ErrEmptyConfig}) } if len(config.CurrentContext) != 0 { if _, exists := config.Contexts[config.CurrentContext]; !exists { validationError...
[ "func", "Validate", "(", "config", "clientcmdapi", ".", "Config", ")", "error", "{", "validationErrors", ":=", "make", "(", "[", "]", "error", ",", "0", ")", "\n\n", "if", "clientcmdapi", ".", "IsConfigEmpty", "(", "&", "config", ")", "{", "return", "new...
// Validate checks for errors in the Config. It does not return early so that it can find as many errors as possible.
[ "Validate", "checks", "for", "errors", "in", "the", "Config", ".", "It", "does", "not", "return", "early", "so", "that", "it", "can", "find", "as", "many", "errors", "as", "possible", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/client-go/tools/clientcmd/validation.go#L104-L130
kubernetes/kubernetes
staging/src/k8s.io/client-go/tools/clientcmd/validation.go
ConfirmUsable
func ConfirmUsable(config clientcmdapi.Config, passedContextName string) error { validationErrors := make([]error, 0) if clientcmdapi.IsConfigEmpty(&config) { return newErrConfigurationInvalid([]error{ErrEmptyConfig}) } var contextName string if len(passedContextName) != 0 { contextName = passedContextName ...
go
func ConfirmUsable(config clientcmdapi.Config, passedContextName string) error { validationErrors := make([]error, 0) if clientcmdapi.IsConfigEmpty(&config) { return newErrConfigurationInvalid([]error{ErrEmptyConfig}) } var contextName string if len(passedContextName) != 0 { contextName = passedContextName ...
[ "func", "ConfirmUsable", "(", "config", "clientcmdapi", ".", "Config", ",", "passedContextName", "string", ")", "error", "{", "validationErrors", ":=", "make", "(", "[", "]", "error", ",", "0", ")", "\n\n", "if", "clientcmdapi", ".", "IsConfigEmpty", "(", "&...
// ConfirmUsable looks a particular context and determines if that particular part of the config is useable. There might still be errors in the config, // but no errors in the sections requested or referenced. It does not return early so that it can find as many errors as possible.
[ "ConfirmUsable", "looks", "a", "particular", "context", "and", "determines", "if", "that", "particular", "part", "of", "the", "config", "is", "useable", ".", "There", "might", "still", "be", "errors", "in", "the", "config", "but", "no", "errors", "in", "the"...
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/client-go/tools/clientcmd/validation.go#L134-L164
kubernetes/kubernetes
staging/src/k8s.io/client-go/tools/clientcmd/validation.go
validateClusterInfo
func validateClusterInfo(clusterName string, clusterInfo clientcmdapi.Cluster) []error { validationErrors := make([]error, 0) emptyCluster := clientcmdapi.NewCluster() if reflect.DeepEqual(*emptyCluster, clusterInfo) { return []error{ErrEmptyCluster} } if len(clusterInfo.Server) == 0 { if len(clusterName) ==...
go
func validateClusterInfo(clusterName string, clusterInfo clientcmdapi.Cluster) []error { validationErrors := make([]error, 0) emptyCluster := clientcmdapi.NewCluster() if reflect.DeepEqual(*emptyCluster, clusterInfo) { return []error{ErrEmptyCluster} } if len(clusterInfo.Server) == 0 { if len(clusterName) ==...
[ "func", "validateClusterInfo", "(", "clusterName", "string", ",", "clusterInfo", "clientcmdapi", ".", "Cluster", ")", "[", "]", "error", "{", "validationErrors", ":=", "make", "(", "[", "]", "error", ",", "0", ")", "\n\n", "emptyCluster", ":=", "clientcmdapi",...
// validateClusterInfo looks for conflicts and errors in the cluster info
[ "validateClusterInfo", "looks", "for", "conflicts", "and", "errors", "in", "the", "cluster", "info" ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/client-go/tools/clientcmd/validation.go#L167-L195
kubernetes/kubernetes
staging/src/k8s.io/client-go/tools/clientcmd/validation.go
validateAuthInfo
func validateAuthInfo(authInfoName string, authInfo clientcmdapi.AuthInfo) []error { validationErrors := make([]error, 0) usingAuthPath := false methods := make([]string, 0, 3) if len(authInfo.Token) != 0 { methods = append(methods, "token") } if len(authInfo.Username) != 0 || len(authInfo.Password) != 0 { m...
go
func validateAuthInfo(authInfoName string, authInfo clientcmdapi.AuthInfo) []error { validationErrors := make([]error, 0) usingAuthPath := false methods := make([]string, 0, 3) if len(authInfo.Token) != 0 { methods = append(methods, "token") } if len(authInfo.Username) != 0 || len(authInfo.Password) != 0 { m...
[ "func", "validateAuthInfo", "(", "authInfoName", "string", ",", "authInfo", "clientcmdapi", ".", "AuthInfo", ")", "[", "]", "error", "{", "validationErrors", ":=", "make", "(", "[", "]", "error", ",", "0", ")", "\n\n", "usingAuthPath", ":=", "false", "\n", ...
// validateAuthInfo looks for conflicts and errors in the auth info
[ "validateAuthInfo", "looks", "for", "conflicts", "and", "errors", "in", "the", "auth", "info" ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/client-go/tools/clientcmd/validation.go#L198-L269
kubernetes/kubernetes
staging/src/k8s.io/client-go/tools/clientcmd/validation.go
validateContext
func validateContext(contextName string, context clientcmdapi.Context, config clientcmdapi.Config) []error { validationErrors := make([]error, 0) if len(contextName) == 0 { validationErrors = append(validationErrors, fmt.Errorf("empty context name for %#v is not allowed", context)) } if len(context.AuthInfo) ==...
go
func validateContext(contextName string, context clientcmdapi.Context, config clientcmdapi.Config) []error { validationErrors := make([]error, 0) if len(contextName) == 0 { validationErrors = append(validationErrors, fmt.Errorf("empty context name for %#v is not allowed", context)) } if len(context.AuthInfo) ==...
[ "func", "validateContext", "(", "contextName", "string", ",", "context", "clientcmdapi", ".", "Context", ",", "config", "clientcmdapi", ".", "Config", ")", "[", "]", "error", "{", "validationErrors", ":=", "make", "(", "[", "]", "error", ",", "0", ")", "\n...
// validateContext looks for errors in the context. It is not transitive, so errors in the reference authInfo or cluster configs are not included in this return
[ "validateContext", "looks", "for", "errors", "in", "the", "context", ".", "It", "is", "not", "transitive", "so", "errors", "in", "the", "reference", "authInfo", "or", "cluster", "configs", "are", "not", "included", "in", "this", "return" ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/client-go/tools/clientcmd/validation.go#L272-L298
kubernetes/kubernetes
pkg/kubectl/cmd/delete/delete_flags.go
NewDeleteCommandFlags
func NewDeleteCommandFlags(usage string) *DeleteFlags { cascade := true gracePeriod := -1 // setup command defaults all := false allNamespaces := false force := false ignoreNotFound := false now := false output := "" labelSelector := "" fieldSelector := "" timeout := time.Duration(0) wait := true filena...
go
func NewDeleteCommandFlags(usage string) *DeleteFlags { cascade := true gracePeriod := -1 // setup command defaults all := false allNamespaces := false force := false ignoreNotFound := false now := false output := "" labelSelector := "" fieldSelector := "" timeout := time.Duration(0) wait := true filena...
[ "func", "NewDeleteCommandFlags", "(", "usage", "string", ")", "*", "DeleteFlags", "{", "cascade", ":=", "true", "\n", "gracePeriod", ":=", "-", "1", "\n\n", "// setup command defaults", "all", ":=", "false", "\n", "allNamespaces", ":=", "false", "\n", "force", ...
// NewDeleteCommandFlags provides default flags and values for use with the "delete" command
[ "NewDeleteCommandFlags", "provides", "default", "flags", "and", "values", "for", "use", "with", "the", "delete", "command" ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/kubectl/cmd/delete/delete_flags.go#L141-L179
kubernetes/kubernetes
pkg/kubectl/cmd/delete/delete_flags.go
NewDeleteFlags
func NewDeleteFlags(usage string) *DeleteFlags { cascade := true gracePeriod := -1 force := false timeout := time.Duration(0) wait := false filenames := []string{} kustomize := "" recursive := false return &DeleteFlags{ FileNameFlags: &genericclioptions.FileNameFlags{Usage: usage, Filenames: &filenames, K...
go
func NewDeleteFlags(usage string) *DeleteFlags { cascade := true gracePeriod := -1 force := false timeout := time.Duration(0) wait := false filenames := []string{} kustomize := "" recursive := false return &DeleteFlags{ FileNameFlags: &genericclioptions.FileNameFlags{Usage: usage, Filenames: &filenames, K...
[ "func", "NewDeleteFlags", "(", "usage", "string", ")", "*", "DeleteFlags", "{", "cascade", ":=", "true", "\n", "gracePeriod", ":=", "-", "1", "\n\n", "force", ":=", "false", "\n", "timeout", ":=", "time", ".", "Duration", "(", "0", ")", "\n", "wait", "...
// NewDeleteFlags provides default flags and values for use in commands outside of "delete"
[ "NewDeleteFlags", "provides", "default", "flags", "and", "values", "for", "use", "in", "commands", "outside", "of", "delete" ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/kubectl/cmd/delete/delete_flags.go#L182-L205
kubernetes/kubernetes
pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go
ensureExternalLoadBalancer
func (g *Cloud) ensureExternalLoadBalancer(clusterName string, clusterID string, apiService *v1.Service, existingFwdRule *compute.ForwardingRule, nodes []*v1.Node) (*v1.LoadBalancerStatus, error) { if len(nodes) == 0 { return nil, fmt.Errorf("Cannot EnsureLoadBalancer() with no hosts") } hostNames := nodeNames(no...
go
func (g *Cloud) ensureExternalLoadBalancer(clusterName string, clusterID string, apiService *v1.Service, existingFwdRule *compute.ForwardingRule, nodes []*v1.Node) (*v1.LoadBalancerStatus, error) { if len(nodes) == 0 { return nil, fmt.Errorf("Cannot EnsureLoadBalancer() with no hosts") } hostNames := nodeNames(no...
[ "func", "(", "g", "*", "Cloud", ")", "ensureExternalLoadBalancer", "(", "clusterName", "string", ",", "clusterID", "string", ",", "apiService", "*", "v1", ".", "Service", ",", "existingFwdRule", "*", "compute", ".", "ForwardingRule", ",", "nodes", "[", "]", ...
// ensureExternalLoadBalancer is the external implementation of LoadBalancer.EnsureLoadBalancer. // Our load balancers in GCE consist of four separate GCE resources - a static // IP address, a firewall rule, a target pool, and a forwarding rule. This // function has to manage all of them. // // Due to an interesting se...
[ "ensureExternalLoadBalancer", "is", "the", "external", "implementation", "of", "LoadBalancer", ".", "EnsureLoadBalancer", ".", "Our", "load", "balancers", "in", "GCE", "consist", "of", "four", "separate", "GCE", "resources", "-", "a", "static", "IP", "address", "a...
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go#L47-L275
kubernetes/kubernetes
pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go
updateExternalLoadBalancer
func (g *Cloud) updateExternalLoadBalancer(clusterName string, service *v1.Service, nodes []*v1.Node) error { hosts, err := g.getInstancesByNames(nodeNames(nodes)) if err != nil { return err } loadBalancerName := g.GetLoadBalancerName(context.TODO(), clusterName, service) return g.updateTargetPool(loadBalancerN...
go
func (g *Cloud) updateExternalLoadBalancer(clusterName string, service *v1.Service, nodes []*v1.Node) error { hosts, err := g.getInstancesByNames(nodeNames(nodes)) if err != nil { return err } loadBalancerName := g.GetLoadBalancerName(context.TODO(), clusterName, service) return g.updateTargetPool(loadBalancerN...
[ "func", "(", "g", "*", "Cloud", ")", "updateExternalLoadBalancer", "(", "clusterName", "string", ",", "service", "*", "v1", ".", "Service", ",", "nodes", "[", "]", "*", "v1", ".", "Node", ")", "error", "{", "hosts", ",", "err", ":=", "g", ".", "getIn...
// updateExternalLoadBalancer is the external implementation of LoadBalancer.UpdateLoadBalancer.
[ "updateExternalLoadBalancer", "is", "the", "external", "implementation", "of", "LoadBalancer", ".", "UpdateLoadBalancer", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go#L278-L286
kubernetes/kubernetes
pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go
ensureExternalLoadBalancerDeleted
func (g *Cloud) ensureExternalLoadBalancerDeleted(clusterName, clusterID string, service *v1.Service) error { loadBalancerName := g.GetLoadBalancerName(context.TODO(), clusterName, service) serviceName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name} lbRefStr := fmt.Sprintf("%v(%v)", loadBal...
go
func (g *Cloud) ensureExternalLoadBalancerDeleted(clusterName, clusterID string, service *v1.Service) error { loadBalancerName := g.GetLoadBalancerName(context.TODO(), clusterName, service) serviceName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name} lbRefStr := fmt.Sprintf("%v(%v)", loadBal...
[ "func", "(", "g", "*", "Cloud", ")", "ensureExternalLoadBalancerDeleted", "(", "clusterName", ",", "clusterID", "string", ",", "service", "*", "v1", ".", "Service", ")", "error", "{", "loadBalancerName", ":=", "g", ".", "GetLoadBalancerName", "(", "context", "...
// ensureExternalLoadBalancerDeleted is the external implementation of LoadBalancer.EnsureLoadBalancerDeleted
[ "ensureExternalLoadBalancerDeleted", "is", "the", "external", "implementation", "of", "LoadBalancer", ".", "EnsureLoadBalancerDeleted" ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go#L289-L351
kubernetes/kubernetes
pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go
DeleteExternalTargetPoolAndChecks
func (g *Cloud) DeleteExternalTargetPoolAndChecks(service *v1.Service, name, region, clusterID string, hcNames ...string) error { serviceName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name} lbRefStr := fmt.Sprintf("%v(%v)", name, serviceName) if err := g.DeleteTargetPool(name, region); err...
go
func (g *Cloud) DeleteExternalTargetPoolAndChecks(service *v1.Service, name, region, clusterID string, hcNames ...string) error { serviceName := types.NamespacedName{Namespace: service.Namespace, Name: service.Name} lbRefStr := fmt.Sprintf("%v(%v)", name, serviceName) if err := g.DeleteTargetPool(name, region); err...
[ "func", "(", "g", "*", "Cloud", ")", "DeleteExternalTargetPoolAndChecks", "(", "service", "*", "v1", ".", "Service", ",", "name", ",", "region", ",", "clusterID", "string", ",", "hcNames", "...", "string", ")", "error", "{", "serviceName", ":=", "types", "...
// DeleteExternalTargetPoolAndChecks Deletes an external load balancer pool and verifies the operation
[ "DeleteExternalTargetPoolAndChecks", "Deletes", "an", "external", "load", "balancer", "pool", "and", "verifies", "the", "operation" ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go#L354-L414
kubernetes/kubernetes
pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go
verifyUserRequestedIP
func verifyUserRequestedIP(s CloudAddressService, region, requestedIP, fwdRuleIP, lbRef string, desiredNetTier cloud.NetworkTier) (isUserOwnedIP bool, err error) { if requestedIP == "" { return false, nil } // If a specific IP address has been requested, we have to respect the // user's request and use that IP. I...
go
func verifyUserRequestedIP(s CloudAddressService, region, requestedIP, fwdRuleIP, lbRef string, desiredNetTier cloud.NetworkTier) (isUserOwnedIP bool, err error) { if requestedIP == "" { return false, nil } // If a specific IP address has been requested, we have to respect the // user's request and use that IP. I...
[ "func", "verifyUserRequestedIP", "(", "s", "CloudAddressService", ",", "region", ",", "requestedIP", ",", "fwdRuleIP", ",", "lbRef", "string", ",", "desiredNetTier", "cloud", ".", "NetworkTier", ")", "(", "isUserOwnedIP", "bool", ",", "err", "error", ")", "{", ...
// verifyUserRequestedIP checks the user-provided IP to see whether it meets // all the expected attributes for the load balancer, and returns an error if // the verification failed. It also returns a boolean to indicate whether the // IP address is considered owned by the user (i.e., not managed by the // controller.
[ "verifyUserRequestedIP", "checks", "the", "user", "-", "provided", "IP", "to", "see", "whether", "it", "meets", "all", "the", "expected", "attributes", "for", "the", "load", "balancer", "and", "returns", "an", "error", "if", "the", "verification", "failed", "....
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go#L421-L464
kubernetes/kubernetes
pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go
mergeHTTPHealthChecks
func mergeHTTPHealthChecks(hc, newHC *compute.HttpHealthCheck) *compute.HttpHealthCheck { if hc.CheckIntervalSec > newHC.CheckIntervalSec { newHC.CheckIntervalSec = hc.CheckIntervalSec } if hc.TimeoutSec > newHC.TimeoutSec { newHC.TimeoutSec = hc.TimeoutSec } if hc.UnhealthyThreshold > newHC.UnhealthyThreshold...
go
func mergeHTTPHealthChecks(hc, newHC *compute.HttpHealthCheck) *compute.HttpHealthCheck { if hc.CheckIntervalSec > newHC.CheckIntervalSec { newHC.CheckIntervalSec = hc.CheckIntervalSec } if hc.TimeoutSec > newHC.TimeoutSec { newHC.TimeoutSec = hc.TimeoutSec } if hc.UnhealthyThreshold > newHC.UnhealthyThreshold...
[ "func", "mergeHTTPHealthChecks", "(", "hc", ",", "newHC", "*", "compute", ".", "HttpHealthCheck", ")", "*", "compute", ".", "HttpHealthCheck", "{", "if", "hc", ".", "CheckIntervalSec", ">", "newHC", ".", "CheckIntervalSec", "{", "newHC", ".", "CheckIntervalSec",...
// mergeHTTPHealthChecks reconciles HttpHealthCheck configures to be no smaller // than the default values. // E.g. old health check interval is 2s, new default is 8. // The HC interval will be reconciled to 8 seconds. // If the existing health check is larger than the default interval, // the configuration will be kep...
[ "mergeHTTPHealthChecks", "reconciles", "HttpHealthCheck", "configures", "to", "be", "no", "smaller", "than", "the", "default", "values", ".", "E", ".", "g", ".", "old", "health", "check", "interval", "is", "2s", "new", "default", "is", "8", ".", "The", "HC",...
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go#L639-L653
kubernetes/kubernetes
pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go
needToUpdateHTTPHealthChecks
func needToUpdateHTTPHealthChecks(hc, newHC *compute.HttpHealthCheck) bool { changed := hc.Port != newHC.Port || hc.RequestPath != newHC.RequestPath || hc.Description != newHC.Description changed = changed || hc.CheckIntervalSec < newHC.CheckIntervalSec || hc.TimeoutSec < newHC.TimeoutSec changed = changed || hc.Unh...
go
func needToUpdateHTTPHealthChecks(hc, newHC *compute.HttpHealthCheck) bool { changed := hc.Port != newHC.Port || hc.RequestPath != newHC.RequestPath || hc.Description != newHC.Description changed = changed || hc.CheckIntervalSec < newHC.CheckIntervalSec || hc.TimeoutSec < newHC.TimeoutSec changed = changed || hc.Unh...
[ "func", "needToUpdateHTTPHealthChecks", "(", "hc", ",", "newHC", "*", "compute", ".", "HttpHealthCheck", ")", "bool", "{", "changed", ":=", "hc", ".", "Port", "!=", "newHC", ".", "Port", "||", "hc", ".", "RequestPath", "!=", "newHC", ".", "RequestPath", "|...
// needToUpdateHTTPHealthChecks checks whether the http healthcheck needs to be // updated.
[ "needToUpdateHTTPHealthChecks", "checks", "whether", "the", "http", "healthcheck", "needs", "to", "be", "updated", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go#L657-L662
kubernetes/kubernetes
pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go
forwardingRuleNeedsUpdate
func (g *Cloud) forwardingRuleNeedsUpdate(name, region string, loadBalancerIP string, ports []v1.ServicePort) (exists bool, needsUpdate bool, ipAddress string, err error) { fwd, err := g.GetRegionForwardingRule(name, region) if err != nil { if isHTTPErrorCode(err, http.StatusNotFound) { return false, true, "", n...
go
func (g *Cloud) forwardingRuleNeedsUpdate(name, region string, loadBalancerIP string, ports []v1.ServicePort) (exists bool, needsUpdate bool, ipAddress string, err error) { fwd, err := g.GetRegionForwardingRule(name, region) if err != nil { if isHTTPErrorCode(err, http.StatusNotFound) { return false, true, "", n...
[ "func", "(", "g", "*", "Cloud", ")", "forwardingRuleNeedsUpdate", "(", "name", ",", "region", "string", ",", "loadBalancerIP", "string", ",", "ports", "[", "]", "v1", ".", "ServicePort", ")", "(", "exists", "bool", ",", "needsUpdate", "bool", ",", "ipAddre...
// Passing nil for requested IP is perfectly fine - it just means that no specific // IP is being requested. // Returns whether the forwarding rule exists, whether it needs to be updated, // what its IP address is (if it exists), and any error we encountered.
[ "Passing", "nil", "for", "requested", "IP", "is", "perfectly", "fine", "-", "it", "just", "means", "that", "no", "specific", "IP", "is", "being", "requested", ".", "Returns", "whether", "the", "forwarding", "rule", "exists", "whether", "it", "needs", "to", ...
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go#L702-L737
kubernetes/kubernetes
pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go
targetPoolNeedsRecreation
func (g *Cloud) targetPoolNeedsRecreation(name, region string, affinityType v1.ServiceAffinity) (exists bool, needsRecreation bool, err error) { tp, err := g.GetTargetPool(name, region) if err != nil { if isHTTPErrorCode(err, http.StatusNotFound) { return false, true, nil } // Err on the side of caution in c...
go
func (g *Cloud) targetPoolNeedsRecreation(name, region string, affinityType v1.ServiceAffinity) (exists bool, needsRecreation bool, err error) { tp, err := g.GetTargetPool(name, region) if err != nil { if isHTTPErrorCode(err, http.StatusNotFound) { return false, true, nil } // Err on the side of caution in c...
[ "func", "(", "g", "*", "Cloud", ")", "targetPoolNeedsRecreation", "(", "name", ",", "region", "string", ",", "affinityType", "v1", ".", "ServiceAffinity", ")", "(", "exists", "bool", ",", "needsRecreation", "bool", ",", "err", "error", ")", "{", "tp", ",",...
// Doesn't check whether the hosts have changed, since host updating is handled // separately.
[ "Doesn", "t", "check", "whether", "the", "hosts", "have", "changed", "since", "host", "updating", "is", "handled", "separately", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go#L741-L764
kubernetes/kubernetes
pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go
deleteFWDRuleWithWrongTier
func deleteFWDRuleWithWrongTier(s CloudForwardingRuleService, region, name, logPrefix string, desiredNetTier cloud.NetworkTier) error { tierStr, err := s.getNetworkTierFromForwardingRule(name, region) if isNotFound(err) { return nil } else if err != nil { return err } existingTier := cloud.NetworkTierGCEValueT...
go
func deleteFWDRuleWithWrongTier(s CloudForwardingRuleService, region, name, logPrefix string, desiredNetTier cloud.NetworkTier) error { tierStr, err := s.getNetworkTierFromForwardingRule(name, region) if isNotFound(err) { return nil } else if err != nil { return err } existingTier := cloud.NetworkTierGCEValueT...
[ "func", "deleteFWDRuleWithWrongTier", "(", "s", "CloudForwardingRuleService", ",", "region", ",", "name", ",", "logPrefix", "string", ",", "desiredNetTier", "cloud", ".", "NetworkTier", ")", "error", "{", "tierStr", ",", "err", ":=", "s", ".", "getNetworkTierFromF...
// deleteFWDRuleWithWrongTier checks the network tier of existing forwarding // rule and delete the rule if the tier does not matched the desired tier.
[ "deleteFWDRuleWithWrongTier", "checks", "the", "network", "tier", "of", "existing", "forwarding", "rule", "and", "delete", "the", "rule", "if", "the", "tier", "does", "not", "matched", "the", "desired", "tier", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go#L1083-L1098
kubernetes/kubernetes
pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go
deleteAddressWithWrongTier
func deleteAddressWithWrongTier(s CloudAddressService, region, name, logPrefix string, desiredNetTier cloud.NetworkTier) error { // We only check the IP address matching the reserved name that the // controller assigned to the LB. We make the assumption that an address of // such name is owned by the controller and ...
go
func deleteAddressWithWrongTier(s CloudAddressService, region, name, logPrefix string, desiredNetTier cloud.NetworkTier) error { // We only check the IP address matching the reserved name that the // controller assigned to the LB. We make the assumption that an address of // such name is owned by the controller and ...
[ "func", "deleteAddressWithWrongTier", "(", "s", "CloudAddressService", ",", "region", ",", "name", ",", "logPrefix", "string", ",", "desiredNetTier", "cloud", ".", "NetworkTier", ")", "error", "{", "// We only check the IP address matching the reserved name that the", "// c...
// deleteAddressWithWrongTier checks the network tier of existing address // and delete the address if the tier does not matched the desired tier.
[ "deleteAddressWithWrongTier", "checks", "the", "network", "tier", "of", "existing", "address", "and", "delete", "the", "address", "if", "the", "tier", "does", "not", "matched", "the", "desired", "tier", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/cloudprovider/providers/gce/gce_loadbalancer_external.go#L1102-L1126
kubernetes/kubernetes
pkg/volume/rbd/disk_manager.go
diskSetUp
func diskSetUp(manager diskManager, b rbdMounter, volPath string, mounter mount.Interface, fsGroup *int64) error { globalPDPath := manager.MakeGlobalPDName(*b.rbd) notMnt, err := mounter.IsLikelyNotMountPoint(globalPDPath) if err != nil && !os.IsNotExist(err) { klog.Errorf("cannot validate mountpoint: %s", globalP...
go
func diskSetUp(manager diskManager, b rbdMounter, volPath string, mounter mount.Interface, fsGroup *int64) error { globalPDPath := manager.MakeGlobalPDName(*b.rbd) notMnt, err := mounter.IsLikelyNotMountPoint(globalPDPath) if err != nil && !os.IsNotExist(err) { klog.Errorf("cannot validate mountpoint: %s", globalP...
[ "func", "diskSetUp", "(", "manager", "diskManager", ",", "b", "rbdMounter", ",", "volPath", "string", ",", "mounter", "mount", ".", "Interface", ",", "fsGroup", "*", "int64", ")", "error", "{", "globalPDPath", ":=", "manager", ".", "MakeGlobalPDName", "(", "...
// utility to mount a disk based filesystem
[ "utility", "to", "mount", "a", "disk", "based", "filesystem" ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/volume/rbd/disk_manager.go#L60-L102
kubernetes/kubernetes
pkg/volume/rbd/disk_manager.go
diskTearDown
func diskTearDown(manager diskManager, c rbdUnmounter, volPath string, mounter mount.Interface) error { notMnt, err := mounter.IsLikelyNotMountPoint(volPath) if err != nil && !os.IsNotExist(err) { klog.Errorf("cannot validate mountpoint: %s", volPath) return err } if notMnt { klog.V(3).Infof("volume path %s i...
go
func diskTearDown(manager diskManager, c rbdUnmounter, volPath string, mounter mount.Interface) error { notMnt, err := mounter.IsLikelyNotMountPoint(volPath) if err != nil && !os.IsNotExist(err) { klog.Errorf("cannot validate mountpoint: %s", volPath) return err } if notMnt { klog.V(3).Infof("volume path %s i...
[ "func", "diskTearDown", "(", "manager", "diskManager", ",", "c", "rbdUnmounter", ",", "volPath", "string", ",", "mounter", "mount", ".", "Interface", ")", "error", "{", "notMnt", ",", "err", ":=", "mounter", ".", "IsLikelyNotMountPoint", "(", "volPath", ")", ...
// utility to tear down a disk based filesystem
[ "utility", "to", "tear", "down", "a", "disk", "based", "filesystem" ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/volume/rbd/disk_manager.go#L105-L134
kubernetes/kubernetes
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/rules/rules.go
Matches
func (r *Matcher) Matches() bool { return r.scope() && r.operation() && r.group() && r.version() && r.resource() }
go
func (r *Matcher) Matches() bool { return r.scope() && r.operation() && r.group() && r.version() && r.resource() }
[ "func", "(", "r", "*", "Matcher", ")", "Matches", "(", ")", "bool", "{", "return", "r", ".", "scope", "(", ")", "&&", "r", ".", "operation", "(", ")", "&&", "r", ".", "group", "(", ")", "&&", "r", ".", "version", "(", ")", "&&", "r", ".", "...
// Matches returns if the Attr matches the Rule.
[ "Matches", "returns", "if", "the", "Attr", "matches", "the", "Rule", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/rules/rules.go#L35-L41
kubernetes/kubernetes
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/rules/rules.go
IsWebhookConfigurationResource
func IsWebhookConfigurationResource(attr admission.Attributes) bool { gvk := attr.GetKind() if gvk.Group == "admissionregistration.k8s.io" { if gvk.Kind == "ValidatingWebhookConfiguration" || gvk.Kind == "MutatingWebhookConfiguration" { return true } } return false }
go
func IsWebhookConfigurationResource(attr admission.Attributes) bool { gvk := attr.GetKind() if gvk.Group == "admissionregistration.k8s.io" { if gvk.Kind == "ValidatingWebhookConfiguration" || gvk.Kind == "MutatingWebhookConfiguration" { return true } } return false }
[ "func", "IsWebhookConfigurationResource", "(", "attr", "admission", ".", "Attributes", ")", "bool", "{", "gvk", ":=", "attr", ".", "GetKind", "(", ")", "\n", "if", "gvk", ".", "Group", "==", "\"", "\"", "{", "if", "gvk", ".", "Kind", "==", "\"", "\"", ...
// IsWebhookConfigurationResource determines if an admission.Attributes object is describing // the admission of a ValidatingWebhookConfiguration or a MutatingWebhookConfiguration
[ "IsWebhookConfigurationResource", "determines", "if", "an", "admission", ".", "Attributes", "object", "is", "describing", "the", "admission", "of", "a", "ValidatingWebhookConfiguration", "or", "a", "MutatingWebhookConfiguration" ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/rules/rules.go#L121-L129
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopy
func (in *MutatingWebhookConfiguration) DeepCopy() *MutatingWebhookConfiguration { if in == nil { return nil } out := new(MutatingWebhookConfiguration) in.DeepCopyInto(out) return out }
go
func (in *MutatingWebhookConfiguration) DeepCopy() *MutatingWebhookConfiguration { if in == nil { return nil } out := new(MutatingWebhookConfiguration) in.DeepCopyInto(out) return out }
[ "func", "(", "in", "*", "MutatingWebhookConfiguration", ")", "DeepCopy", "(", ")", "*", "MutatingWebhookConfiguration", "{", "if", "in", "==", "nil", "{", "return", "nil", "\n", "}", "\n", "out", ":=", "new", "(", "MutatingWebhookConfiguration", ")", "\n", "...
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingWebhookConfiguration.
[ "DeepCopy", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "creating", "a", "new", "MutatingWebhookConfiguration", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L44-L51
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopyObject
func (in *MutatingWebhookConfiguration) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil }
go
func (in *MutatingWebhookConfiguration) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil }
[ "func", "(", "in", "*", "MutatingWebhookConfiguration", ")", "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", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L54-L59
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopyInto
func (in *MutatingWebhookConfigurationList) DeepCopyInto(out *MutatingWebhookConfigurationList) { *out = *in out.TypeMeta = in.TypeMeta out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]MutatingWebhookConfiguration, len(*in)) for i := range *in { (*in)[i].DeepCo...
go
func (in *MutatingWebhookConfigurationList) DeepCopyInto(out *MutatingWebhookConfigurationList) { *out = *in out.TypeMeta = in.TypeMeta out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]MutatingWebhookConfiguration, len(*in)) for i := range *in { (*in)[i].DeepCo...
[ "func", "(", "in", "*", "MutatingWebhookConfigurationList", ")", "DeepCopyInto", "(", "out", "*", "MutatingWebhookConfigurationList", ")", "{", "*", "out", "=", "*", "in", "\n", "out", ".", "TypeMeta", "=", "in", ".", "TypeMeta", "\n", "out", ".", "ListMeta"...
// 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", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L62-L74
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopy
func (in *MutatingWebhookConfigurationList) DeepCopy() *MutatingWebhookConfigurationList { if in == nil { return nil } out := new(MutatingWebhookConfigurationList) in.DeepCopyInto(out) return out }
go
func (in *MutatingWebhookConfigurationList) DeepCopy() *MutatingWebhookConfigurationList { if in == nil { return nil } out := new(MutatingWebhookConfigurationList) in.DeepCopyInto(out) return out }
[ "func", "(", "in", "*", "MutatingWebhookConfigurationList", ")", "DeepCopy", "(", ")", "*", "MutatingWebhookConfigurationList", "{", "if", "in", "==", "nil", "{", "return", "nil", "\n", "}", "\n", "out", ":=", "new", "(", "MutatingWebhookConfigurationList", ")",...
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingWebhookConfigurationList.
[ "DeepCopy", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "creating", "a", "new", "MutatingWebhookConfigurationList", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L77-L84
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopyObject
func (in *MutatingWebhookConfigurationList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil }
go
func (in *MutatingWebhookConfigurationList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil }
[ "func", "(", "in", "*", "MutatingWebhookConfigurationList", ")", "DeepCopyObject", "(", ")", "runtime", ".", "Object", "{", "if", "c", ":=", "in", ".", "DeepCopy", "(", ")", ";", "c", "!=", "nil", "{", "return", "c", "\n", "}", "\n", "return", "nil", ...
// 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", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L87-L92
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopyInto
func (in *Rule) DeepCopyInto(out *Rule) { *out = *in if in.APIGroups != nil { in, out := &in.APIGroups, &out.APIGroups *out = make([]string, len(*in)) copy(*out, *in) } if in.APIVersions != nil { in, out := &in.APIVersions, &out.APIVersions *out = make([]string, len(*in)) copy(*out, *in) } if in.Resou...
go
func (in *Rule) DeepCopyInto(out *Rule) { *out = *in if in.APIGroups != nil { in, out := &in.APIGroups, &out.APIGroups *out = make([]string, len(*in)) copy(*out, *in) } if in.APIVersions != nil { in, out := &in.APIVersions, &out.APIVersions *out = make([]string, len(*in)) copy(*out, *in) } if in.Resou...
[ "func", "(", "in", "*", "Rule", ")", "DeepCopyInto", "(", "out", "*", "Rule", ")", "{", "*", "out", "=", "*", "in", "\n", "if", "in", ".", "APIGroups", "!=", "nil", "{", "in", ",", "out", ":=", "&", "in", ".", "APIGroups", ",", "&", "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", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L95-L118
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopy
func (in *Rule) DeepCopy() *Rule { if in == nil { return nil } out := new(Rule) in.DeepCopyInto(out) return out }
go
func (in *Rule) DeepCopy() *Rule { if in == nil { return nil } out := new(Rule) in.DeepCopyInto(out) return out }
[ "func", "(", "in", "*", "Rule", ")", "DeepCopy", "(", ")", "*", "Rule", "{", "if", "in", "==", "nil", "{", "return", "nil", "\n", "}", "\n", "out", ":=", "new", "(", "Rule", ")", "\n", "in", ".", "DeepCopyInto", "(", "out", ")", "\n", "return",...
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule.
[ "DeepCopy", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "creating", "a", "new", "Rule", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L121-L128
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopyInto
func (in *RuleWithOperations) DeepCopyInto(out *RuleWithOperations) { *out = *in if in.Operations != nil { in, out := &in.Operations, &out.Operations *out = make([]OperationType, len(*in)) copy(*out, *in) } in.Rule.DeepCopyInto(&out.Rule) return }
go
func (in *RuleWithOperations) DeepCopyInto(out *RuleWithOperations) { *out = *in if in.Operations != nil { in, out := &in.Operations, &out.Operations *out = make([]OperationType, len(*in)) copy(*out, *in) } in.Rule.DeepCopyInto(&out.Rule) return }
[ "func", "(", "in", "*", "RuleWithOperations", ")", "DeepCopyInto", "(", "out", "*", "RuleWithOperations", ")", "{", "*", "out", "=", "*", "in", "\n", "if", "in", ".", "Operations", "!=", "nil", "{", "in", ",", "out", ":=", "&", "in", ".", "Operations...
// 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", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L131-L140
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopy
func (in *RuleWithOperations) DeepCopy() *RuleWithOperations { if in == nil { return nil } out := new(RuleWithOperations) in.DeepCopyInto(out) return out }
go
func (in *RuleWithOperations) DeepCopy() *RuleWithOperations { if in == nil { return nil } out := new(RuleWithOperations) in.DeepCopyInto(out) return out }
[ "func", "(", "in", "*", "RuleWithOperations", ")", "DeepCopy", "(", ")", "*", "RuleWithOperations", "{", "if", "in", "==", "nil", "{", "return", "nil", "\n", "}", "\n", "out", ":=", "new", "(", "RuleWithOperations", ")", "\n", "in", ".", "DeepCopyInto", ...
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleWithOperations.
[ "DeepCopy", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "creating", "a", "new", "RuleWithOperations", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L143-L150
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopyInto
func (in *ServiceReference) DeepCopyInto(out *ServiceReference) { *out = *in if in.Path != nil { in, out := &in.Path, &out.Path *out = new(string) **out = **in } return }
go
func (in *ServiceReference) DeepCopyInto(out *ServiceReference) { *out = *in if in.Path != nil { in, out := &in.Path, &out.Path *out = new(string) **out = **in } return }
[ "func", "(", "in", "*", "ServiceReference", ")", "DeepCopyInto", "(", "out", "*", "ServiceReference", ")", "{", "*", "out", "=", "*", "in", "\n", "if", "in", ".", "Path", "!=", "nil", "{", "in", ",", "out", ":=", "&", "in", ".", "Path", ",", "&",...
// 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", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L153-L161
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopy
func (in *ServiceReference) DeepCopy() *ServiceReference { if in == nil { return nil } out := new(ServiceReference) in.DeepCopyInto(out) return out }
go
func (in *ServiceReference) DeepCopy() *ServiceReference { if in == nil { return nil } out := new(ServiceReference) in.DeepCopyInto(out) return out }
[ "func", "(", "in", "*", "ServiceReference", ")", "DeepCopy", "(", ")", "*", "ServiceReference", "{", "if", "in", "==", "nil", "{", "return", "nil", "\n", "}", "\n", "out", ":=", "new", "(", "ServiceReference", ")", "\n", "in", ".", "DeepCopyInto", "(",...
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference.
[ "DeepCopy", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "creating", "a", "new", "ServiceReference", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L164-L171
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopyInto
func (in *ValidatingWebhookConfiguration) DeepCopyInto(out *ValidatingWebhookConfiguration) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) if in.Webhooks != nil { in, out := &in.Webhooks, &out.Webhooks *out = make([]Webhook, len(*in)) for i := range *in { (*in)[i].DeepC...
go
func (in *ValidatingWebhookConfiguration) DeepCopyInto(out *ValidatingWebhookConfiguration) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) if in.Webhooks != nil { in, out := &in.Webhooks, &out.Webhooks *out = make([]Webhook, len(*in)) for i := range *in { (*in)[i].DeepC...
[ "func", "(", "in", "*", "ValidatingWebhookConfiguration", ")", "DeepCopyInto", "(", "out", "*", "ValidatingWebhookConfiguration", ")", "{", "*", "out", "=", "*", "in", "\n", "out", ".", "TypeMeta", "=", "in", ".", "TypeMeta", "\n", "in", ".", "ObjectMeta", ...
// 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", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L174-L186
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopy
func (in *ValidatingWebhookConfiguration) DeepCopy() *ValidatingWebhookConfiguration { if in == nil { return nil } out := new(ValidatingWebhookConfiguration) in.DeepCopyInto(out) return out }
go
func (in *ValidatingWebhookConfiguration) DeepCopy() *ValidatingWebhookConfiguration { if in == nil { return nil } out := new(ValidatingWebhookConfiguration) in.DeepCopyInto(out) return out }
[ "func", "(", "in", "*", "ValidatingWebhookConfiguration", ")", "DeepCopy", "(", ")", "*", "ValidatingWebhookConfiguration", "{", "if", "in", "==", "nil", "{", "return", "nil", "\n", "}", "\n", "out", ":=", "new", "(", "ValidatingWebhookConfiguration", ")", "\n...
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingWebhookConfiguration.
[ "DeepCopy", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "creating", "a", "new", "ValidatingWebhookConfiguration", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L189-L196
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopyObject
func (in *ValidatingWebhookConfiguration) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil }
go
func (in *ValidatingWebhookConfiguration) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil }
[ "func", "(", "in", "*", "ValidatingWebhookConfiguration", ")", "DeepCopyObject", "(", ")", "runtime", ".", "Object", "{", "if", "c", ":=", "in", ".", "DeepCopy", "(", ")", ";", "c", "!=", "nil", "{", "return", "c", "\n", "}", "\n", "return", "nil", "...
// 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", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L199-L204
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopyInto
func (in *ValidatingWebhookConfigurationList) DeepCopyInto(out *ValidatingWebhookConfigurationList) { *out = *in out.TypeMeta = in.TypeMeta out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ValidatingWebhookConfiguration, len(*in)) for i := range *in { (*in)[i]....
go
func (in *ValidatingWebhookConfigurationList) DeepCopyInto(out *ValidatingWebhookConfigurationList) { *out = *in out.TypeMeta = in.TypeMeta out.ListMeta = in.ListMeta if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ValidatingWebhookConfiguration, len(*in)) for i := range *in { (*in)[i]....
[ "func", "(", "in", "*", "ValidatingWebhookConfigurationList", ")", "DeepCopyInto", "(", "out", "*", "ValidatingWebhookConfigurationList", ")", "{", "*", "out", "=", "*", "in", "\n", "out", ".", "TypeMeta", "=", "in", ".", "TypeMeta", "\n", "out", ".", "ListM...
// 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", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L207-L219
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopy
func (in *ValidatingWebhookConfigurationList) DeepCopy() *ValidatingWebhookConfigurationList { if in == nil { return nil } out := new(ValidatingWebhookConfigurationList) in.DeepCopyInto(out) return out }
go
func (in *ValidatingWebhookConfigurationList) DeepCopy() *ValidatingWebhookConfigurationList { if in == nil { return nil } out := new(ValidatingWebhookConfigurationList) in.DeepCopyInto(out) return out }
[ "func", "(", "in", "*", "ValidatingWebhookConfigurationList", ")", "DeepCopy", "(", ")", "*", "ValidatingWebhookConfigurationList", "{", "if", "in", "==", "nil", "{", "return", "nil", "\n", "}", "\n", "out", ":=", "new", "(", "ValidatingWebhookConfigurationList", ...
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingWebhookConfigurationList.
[ "DeepCopy", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "creating", "a", "new", "ValidatingWebhookConfigurationList", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L222-L229
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopyObject
func (in *ValidatingWebhookConfigurationList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil }
go
func (in *ValidatingWebhookConfigurationList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil }
[ "func", "(", "in", "*", "ValidatingWebhookConfigurationList", ")", "DeepCopyObject", "(", ")", "runtime", ".", "Object", "{", "if", "c", ":=", "in", ".", "DeepCopy", "(", ")", ";", "c", "!=", "nil", "{", "return", "c", "\n", "}", "\n", "return", "nil",...
// 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", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L232-L237
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopyInto
func (in *Webhook) DeepCopyInto(out *Webhook) { *out = *in in.ClientConfig.DeepCopyInto(&out.ClientConfig) if in.Rules != nil { in, out := &in.Rules, &out.Rules *out = make([]RuleWithOperations, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.FailurePolicy != nil { in, out :...
go
func (in *Webhook) DeepCopyInto(out *Webhook) { *out = *in in.ClientConfig.DeepCopyInto(&out.ClientConfig) if in.Rules != nil { in, out := &in.Rules, &out.Rules *out = make([]RuleWithOperations, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.FailurePolicy != nil { in, out :...
[ "func", "(", "in", "*", "Webhook", ")", "DeepCopyInto", "(", "out", "*", "Webhook", ")", "{", "*", "out", "=", "*", "in", "\n", "in", ".", "ClientConfig", ".", "DeepCopyInto", "(", "&", "out", ".", "ClientConfig", ")", "\n", "if", "in", ".", "Rules...
// 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", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L240-L276
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopy
func (in *Webhook) DeepCopy() *Webhook { if in == nil { return nil } out := new(Webhook) in.DeepCopyInto(out) return out }
go
func (in *Webhook) DeepCopy() *Webhook { if in == nil { return nil } out := new(Webhook) in.DeepCopyInto(out) return out }
[ "func", "(", "in", "*", "Webhook", ")", "DeepCopy", "(", ")", "*", "Webhook", "{", "if", "in", "==", "nil", "{", "return", "nil", "\n", "}", "\n", "out", ":=", "new", "(", "Webhook", ")", "\n", "in", ".", "DeepCopyInto", "(", "out", ")", "\n", ...
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Webhook.
[ "DeepCopy", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "creating", "a", "new", "Webhook", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L279-L286
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopyInto
func (in *WebhookClientConfig) DeepCopyInto(out *WebhookClientConfig) { *out = *in if in.URL != nil { in, out := &in.URL, &out.URL *out = new(string) **out = **in } if in.Service != nil { in, out := &in.Service, &out.Service *out = new(ServiceReference) (*in).DeepCopyInto(*out) } if in.CABundle != nil...
go
func (in *WebhookClientConfig) DeepCopyInto(out *WebhookClientConfig) { *out = *in if in.URL != nil { in, out := &in.URL, &out.URL *out = new(string) **out = **in } if in.Service != nil { in, out := &in.Service, &out.Service *out = new(ServiceReference) (*in).DeepCopyInto(*out) } if in.CABundle != nil...
[ "func", "(", "in", "*", "WebhookClientConfig", ")", "DeepCopyInto", "(", "out", "*", "WebhookClientConfig", ")", "{", "*", "out", "=", "*", "in", "\n", "if", "in", ".", "URL", "!=", "nil", "{", "in", ",", "out", ":=", "&", "in", ".", "URL", ",", ...
// 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", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L289-L307
kubernetes/kubernetes
pkg/apis/admissionregistration/zz_generated.deepcopy.go
DeepCopy
func (in *WebhookClientConfig) DeepCopy() *WebhookClientConfig { if in == nil { return nil } out := new(WebhookClientConfig) in.DeepCopyInto(out) return out }
go
func (in *WebhookClientConfig) DeepCopy() *WebhookClientConfig { if in == nil { return nil } out := new(WebhookClientConfig) in.DeepCopyInto(out) return out }
[ "func", "(", "in", "*", "WebhookClientConfig", ")", "DeepCopy", "(", ")", "*", "WebhookClientConfig", "{", "if", "in", "==", "nil", "{", "return", "nil", "\n", "}", "\n", "out", ":=", "new", "(", "WebhookClientConfig", ")", "\n", "in", ".", "DeepCopyInto...
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookClientConfig.
[ "DeepCopy", "is", "an", "autogenerated", "deepcopy", "function", "copying", "the", "receiver", "creating", "a", "new", "WebhookClientConfig", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/apis/admissionregistration/zz_generated.deepcopy.go#L310-L317
kubernetes/kubernetes
pkg/util/node/node.go
GetHostname
func GetHostname(hostnameOverride string) (string, error) { hostName := hostnameOverride if len(hostName) == 0 { nodeName, err := os.Hostname() if err != nil { return "", fmt.Errorf("couldn't determine hostname: %v", err) } hostName = nodeName } // Trim whitespaces first to avoid getting an empty hostna...
go
func GetHostname(hostnameOverride string) (string, error) { hostName := hostnameOverride if len(hostName) == 0 { nodeName, err := os.Hostname() if err != nil { return "", fmt.Errorf("couldn't determine hostname: %v", err) } hostName = nodeName } // Trim whitespaces first to avoid getting an empty hostna...
[ "func", "GetHostname", "(", "hostnameOverride", "string", ")", "(", "string", ",", "error", ")", "{", "hostName", ":=", "hostnameOverride", "\n", "if", "len", "(", "hostName", ")", "==", "0", "{", "nodeName", ",", "err", ":=", "os", ".", "Hostname", "(",...
// GetHostname returns OS's hostname if 'hostnameOverride' is empty; otherwise, return 'hostnameOverride'.
[ "GetHostname", "returns", "OS", "s", "hostname", "if", "hostnameOverride", "is", "empty", ";", "otherwise", "return", "hostnameOverride", "." ]
train
https://github.com/kubernetes/kubernetes/blob/6a8a3682919652ae668c389ed2f60efb770eed03/pkg/util/node/node.go#L47-L64
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
4