code
stringlengths
12
335k
docstring
stringlengths
20
20.8k
func_name
stringlengths
1
105
language
stringclasses
1 value
repo
stringclasses
498 values
path
stringlengths
5
172
url
stringlengths
43
235
license
stringclasses
4 values
func RemoveNamespacesPrefix(value string) (string, error) { for _, prefix := range []string{"namespaces/", "namespace/", "ns/"} { if len(value) > len(prefix) && strings.EqualFold(value[0:len(prefix)], prefix) { value = value[len(prefix):] break } } return value, nil }
RemoveNamespacesPrefix is a transformer that strips "ns/", "namespace/" and "namespaces/" prefixes case-insensitively
RemoveNamespacesPrefix
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/overrides.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/overrides.go
Apache-2.0
func NewEmptyConfigError(message string) error { return &errEmptyConfig{message} }
NewEmptyConfigError returns an error wrapping the given message which IsEmptyConfig() will recognize as an empty config error
NewEmptyConfigError
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/validation.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/validation.go
Apache-2.0
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") }
IsContextNotFound returns a boolean indicating whether the error is known to report that a context was not found
IsContextNotFound
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/validation.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/validation.go
Apache-2.0
func IsEmptyConfig(err error) bool { switch t := err.(type) { case errConfigurationInvalid: if len(t) != 1 { return false } _, ok := t[0].(*errEmptyConfig) return ok }
IsEmptyConfig returns true if the provided error indicates the provided configuration is empty.
IsEmptyConfig
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/validation.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/validation.go
Apache-2.0
func ParseTimeout(duration string) (time.Duration, error) { if i, err := strconv.ParseInt(duration, 10, 64); err == nil && i >= 0 { return (time.Duration(i) * time.Second), nil } if requestTimeout, err := time.ParseDuration(duration); err == nil { return requestTimeout, nil } return 0, fmt.Errorf("Invalid timeout value. Timeout must be a single integer in seconds, or an integer followed by a corresponding time unit (e.g. 1s | 2m | 3h)") }
ParseTimeout returns a parsed duration from a string A duration string value must be a positive integer, optionally followed by a corresponding time unit (s|m|h).
ParseTimeout
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/helpers.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/helpers.go
Apache-2.0
func (*defaultAuthLoader) LoadAuth(path string) (*clientauth.Info, error) { return clientauth.LoadFromFile(path) }
LoadAuth for defaultAuthLoader simply delegates to clientauth.LoadFromFile
LoadAuth
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/auth_loaders.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/auth_loaders.go
Apache-2.0
func (a *PromptingAuthLoader) LoadAuth(path string) (*clientauth.Info, error) { // Prompt for user/pass and write a file if none exists. if _, err := os.Stat(path); os.IsNotExist(err) { authPtr, err := a.Prompt() if err != nil { return nil, err } auth := *authPtr data, err := json.Marshal(auth) if err != nil { return &auth, err } err = os.WriteFile(path, data, 0600) return &auth, err } authPtr, err := clientauth.LoadFromFile(path) if err != nil { return nil, err } return authPtr, nil }
LoadAuth parses an AuthInfo object from a file path. It prompts user and creates file if it doesn't exist.
LoadAuth
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/auth_loaders.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/auth_loaders.go
Apache-2.0
func (a *PromptingAuthLoader) Prompt() (*clientauth.Info, error) { var err error auth := &clientauth.Info{} auth.User, err = promptForString("Username", a.reader, true) if err != nil { return nil, err } auth.Password, err = promptForString("Password", nil, false) if err != nil { return nil, err } return auth, nil }
Prompt pulls the user and password from a reader
Prompt
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/auth_loaders.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/auth_loaders.go
Apache-2.0
func NewPromptingAuthLoader(reader io.Reader) *PromptingAuthLoader { return &PromptingAuthLoader{reader} }
NewPromptingAuthLoader is an AuthLoader that parses an AuthInfo object from a file path. It prompts user and creates file if it doesn't exist.
NewPromptingAuthLoader
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/auth_loaders.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/auth_loaders.go
Apache-2.0
func NewDefaultAuthLoader() AuthLoader { return &defaultAuthLoader{} }
NewDefaultAuthLoader returns a default implementation of an AuthLoader that only reads from a config file
NewDefaultAuthLoader
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/auth_loaders.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/auth_loaders.go
Apache-2.0
func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, relativizePaths bool) error { if UseModifyConfigLock { possibleSources := configAccess.GetLoadingPrecedence() // sort the possible kubeconfig files so we always "lock" in the same order // to avoid deadlock (note: this can fail w/ symlinks, but... come on). sort.Strings(possibleSources) for _, filename := range possibleSources { if err := lockFile(filename); err != nil { return err } defer unlockFile(filename) } } startingConfig, err := configAccess.GetStartingConfig() if err != nil { return err } // We need to find all differences, locate their original files, read a partial config to modify only that stanza and write out the file. // Special case the test for current context and preferences since those always write to the default file. if reflect.DeepEqual(*startingConfig, newConfig) { // nothing to do return nil } if startingConfig.CurrentContext != newConfig.CurrentContext { if err := writeCurrentContext(configAccess, newConfig.CurrentContext); err != nil { return err } } if !reflect.DeepEqual(startingConfig.Preferences, newConfig.Preferences) { if err := writePreferences(configAccess, newConfig.Preferences); err != nil { return err } } // Search every cluster, authInfo, and context. First from new to old for differences, then from old to new for deletions for key, cluster := range newConfig.Clusters { startingCluster, exists := startingConfig.Clusters[key] if !reflect.DeepEqual(cluster, startingCluster) || !exists { destinationFile := cluster.LocationOfOrigin if len(destinationFile) == 0 { destinationFile = configAccess.GetDefaultFilename() } configToWrite, err := getConfigFromFile(destinationFile) if err != nil { return err } t := *cluster configToWrite.Clusters[key] = &t configToWrite.Clusters[key].LocationOfOrigin = destinationFile if relativizePaths { if err := RelativizeClusterLocalPaths(configToWrite.Clusters[key]); err != nil { return err } } if err := WriteToFile(*configToWrite, destinationFile); err != nil { return err } } } // seenConfigs stores a map of config source filenames to computed config objects seenConfigs := map[string]*clientcmdapi.Config{} for key, context := range newConfig.Contexts { startingContext, exists := startingConfig.Contexts[key] if !reflect.DeepEqual(context, startingContext) || !exists { destinationFile := context.LocationOfOrigin if len(destinationFile) == 0 { destinationFile = configAccess.GetDefaultFilename() } // we only obtain a fresh config object from its source file // if we have not seen it already - this prevents us from // reading and writing to the same number of files repeatedly // when multiple / all contexts share the same destination file. configToWrite, seen := seenConfigs[destinationFile] if !seen { var err error configToWrite, err = getConfigFromFile(destinationFile) if err != nil { return err } seenConfigs[destinationFile] = configToWrite } configToWrite.Contexts[key] = context } } // actually persist config object changes for destinationFile, configToWrite := range seenConfigs { if err := WriteToFile(*configToWrite, destinationFile); err != nil { return err } } for key, authInfo := range newConfig.AuthInfos { startingAuthInfo, exists := startingConfig.AuthInfos[key] if !reflect.DeepEqual(authInfo, startingAuthInfo) || !exists { destinationFile := authInfo.LocationOfOrigin if len(destinationFile) == 0 { destinationFile = configAccess.GetDefaultFilename() } configToWrite, err := getConfigFromFile(destinationFile) if err != nil { return err } t := *authInfo configToWrite.AuthInfos[key] = &t configToWrite.AuthInfos[key].LocationOfOrigin = destinationFile if relativizePaths { if err := RelativizeAuthInfoLocalPaths(configToWrite.AuthInfos[key]); err != nil { return err } } if err := WriteToFile(*configToWrite, destinationFile); err != nil { return err } } } for key, cluster := range startingConfig.Clusters { if _, exists := newConfig.Clusters[key]; !exists { destinationFile := cluster.LocationOfOrigin if len(destinationFile) == 0 { destinationFile = configAccess.GetDefaultFilename() } configToWrite, err := getConfigFromFile(destinationFile) if err != nil { return err } delete(configToWrite.Clusters, key) if err := WriteToFile(*configToWrite, destinationFile); err != nil { return err } } } for key, context := range startingConfig.Contexts { if _, exists := newConfig.Contexts[key]; !exists { destinationFile := context.LocationOfOrigin if len(destinationFile) == 0 { destinationFile = configAccess.GetDefaultFilename() } configToWrite, err := getConfigFromFile(destinationFile) if err != nil { return err } delete(configToWrite.Contexts, key) if err := WriteToFile(*configToWrite, destinationFile); err != nil { return err } } } for key, authInfo := range startingConfig.AuthInfos { if _, exists := newConfig.AuthInfos[key]; !exists { destinationFile := authInfo.LocationOfOrigin if len(destinationFile) == 0 { destinationFile = configAccess.GetDefaultFilename() } configToWrite, err := getConfigFromFile(destinationFile) if err != nil { return err } delete(configToWrite.AuthInfos, key) if err := WriteToFile(*configToWrite, destinationFile); err != nil { return err } } } return nil }
ModifyConfig takes a Config object, iterates through Clusters, AuthInfos, and Contexts, uses the LocationOfOrigin if specified or uses the default destination file to write the results into. This results in multiple file reads, but it's very easy to follow. Preferences and CurrentContext should always be set in the default destination file. Since we can't distinguish between empty and missing values (no nil strings), we're forced have separate handling for them. In the kubeconfig cases, newConfig should have at most one difference, that means that this code will only write into a single file. If you want to relativizePaths, you must provide a fully qualified path in any modified element.
ModifyConfig
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/config.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/config.go
Apache-2.0
func writeCurrentContext(configAccess ConfigAccess, newCurrentContext string) error { if startingConfig, err := configAccess.GetStartingConfig(); err != nil { return err } else if startingConfig.CurrentContext == newCurrentContext { return nil } if configAccess.IsExplicitFile() { file := configAccess.GetExplicitFile() currConfig, err := getConfigFromFile(file) if err != nil { return err } currConfig.CurrentContext = newCurrentContext if err := WriteToFile(*currConfig, file); err != nil { return err } return nil } if len(newCurrentContext) > 0 { destinationFile := configAccess.GetDefaultFilename() config, err := getConfigFromFile(destinationFile) if err != nil { return err } config.CurrentContext = newCurrentContext if err := WriteToFile(*config, destinationFile); err != nil { return err } return nil } // we're supposed to be clearing the current context. We need to find the first spot in the chain that is setting it and clear it for _, file := range configAccess.GetLoadingPrecedence() { if _, err := os.Stat(file); err == nil { currConfig, err := getConfigFromFile(file) if err != nil { return err } if len(currConfig.CurrentContext) > 0 { currConfig.CurrentContext = newCurrentContext if err := WriteToFile(*currConfig, file); err != nil { return err } return nil } } } return errors.New("no config found to write context") }
writeCurrentContext takes three possible paths. If newCurrentContext is the same as the startingConfig's current context, then we exit. If newCurrentContext has a value, then that value is written into the default destination file. If newCurrentContext is empty, then we find the config file that is setting the CurrentContext and clear the value from that file
writeCurrentContext
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/config.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/config.go
Apache-2.0
func getConfigFromFile(filename string) (*clientcmdapi.Config, error) { config, err := LoadFromFile(filename) if err != nil && !os.IsNotExist(err) { return nil, err } if config == nil { config = clientcmdapi.NewConfig() } return config, nil }
getConfigFromFile tries to read a kubeconfig file and if it can't, returns an error. One exception, missing files result in empty configs, not an error.
getConfigFromFile
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/config.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/config.go
Apache-2.0
func GetConfigFromFileOrDie(filename string) *clientcmdapi.Config { config, err := getConfigFromFile(filename) if err != nil { klog.FatalDepth(1, err) } return config }
GetConfigFromFileOrDie tries to read a kubeconfig file and if it can't, it calls exit. One exception, missing files result in empty configs, not an exit
GetConfigFromFileOrDie
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/config.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/config.go
Apache-2.0
func (c AuthProviderConfig) GoString() string { return c.String() }
GoString implements fmt.GoStringer and sanitizes sensitive fields of AuthProviderConfig to prevent accidental leaking via logs.
GoString
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/types.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/types.go
Apache-2.0
func (c AuthProviderConfig) String() string { cfg := "<nil>" if c.Config != nil { cfg = "--- REDACTED ---" } return fmt.Sprintf("api.AuthProviderConfig{Name: %q, Config: map[string]string{%s}}", c.Name, cfg) }
String implements fmt.Stringer and sanitizes sensitive fields of AuthProviderConfig to prevent accidental leaking via logs.
String
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/types.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/types.go
Apache-2.0
func (c ExecConfig) GoString() string { return c.String() }
GoString implements fmt.GoStringer and sanitizes sensitive fields of ExecConfig to prevent accidental leaking via logs.
GoString
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/types.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/types.go
Apache-2.0
func (c ExecConfig) String() string { var args []string if len(c.Args) > 0 { args = []string{"--- REDACTED ---"} } env := "[]ExecEnvVar(nil)" if len(c.Env) > 0 { env = "[]ExecEnvVar{--- REDACTED ---}" } config := "runtime.Object(nil)" if c.Config != nil { config = "runtime.Object(--- REDACTED ---)" } return fmt.Sprintf("api.ExecConfig{Command: %q, Args: %#v, Env: %s, APIVersion: %q, ProvideClusterInfo: %t, Config: %s, StdinUnavailable: %t}", c.Command, args, env, c.APIVersion, c.ProvideClusterInfo, config, c.StdinUnavailable) }
String implements fmt.Stringer and sanitizes sensitive fields of ExecConfig to prevent accidental leaking via logs.
String
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/types.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/types.go
Apache-2.0
func NewConfig() *Config { return &Config{ Preferences: *NewPreferences(), Clusters: make(map[string]*Cluster), AuthInfos: make(map[string]*AuthInfo), Contexts: make(map[string]*Context), Extensions: make(map[string]runtime.Object), } }
NewConfig is a convenience function that returns a new Config object with non-nil maps
NewConfig
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/types.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/types.go
Apache-2.0
func NewContext() *Context { return &Context{Extensions: make(map[string]runtime.Object)} }
NewContext is a convenience function that returns a new Context object with non-nil maps
NewContext
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/types.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/types.go
Apache-2.0
func NewCluster() *Cluster { return &Cluster{Extensions: make(map[string]runtime.Object)} }
NewCluster is a convenience function that returns a new Cluster object with non-nil maps
NewCluster
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/types.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/types.go
Apache-2.0
func NewAuthInfo() *AuthInfo { return &AuthInfo{ Extensions: make(map[string]runtime.Object), ImpersonateUserExtra: make(map[string][]string), } }
NewAuthInfo is a convenience function that returns a new AuthInfo object with non-nil maps
NewAuthInfo
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/types.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/types.go
Apache-2.0
func NewPreferences() *Preferences { return &Preferences{Extensions: make(map[string]runtime.Object)} }
NewPreferences is a convenience function that returns a new Preferences object with non-nil maps
NewPreferences
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/types.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/types.go
Apache-2.0
func (in *AuthInfo) DeepCopyInto(out *AuthInfo) { *out = *in if in.ClientCertificateData != nil { in, out := &in.ClientCertificateData, &out.ClientCertificateData *out = make([]byte, len(*in)) copy(*out, *in) } if in.ClientKeyData != nil { in, out := &in.ClientKeyData, &out.ClientKeyData *out = make([]byte, len(*in)) copy(*out, *in) } if in.ImpersonateGroups != nil { in, out := &in.ImpersonateGroups, &out.ImpersonateGroups *out = make([]string, len(*in)) copy(*out, *in) } if in.ImpersonateUserExtra != nil { in, out := &in.ImpersonateUserExtra, &out.ImpersonateUserExtra *out = make(map[string][]string, len(*in)) for key, val := range *in { var outVal []string if val == nil { (*out)[key] = nil } else { in, out := &val, &outVal *out = make([]string, len(*in)) copy(*out, *in) } (*out)[key] = outVal } } if in.AuthProvider != nil { in, out := &in.AuthProvider, &out.AuthProvider *out = new(AuthProviderConfig) (*in).DeepCopyInto(*out) } if in.Exec != nil { in, out := &in.Exec, &out.Exec *out = new(ExecConfig) (*in).DeepCopyInto(*out) } if in.Extensions != nil { in, out := &in.Extensions, &out.Extensions *out = make(map[string]runtime.Object, len(*in)) for key, val := range *in { if val == nil { (*out)[key] = nil } else { (*out)[key] = val.DeepCopyObject() } } } return }
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DeepCopyInto
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
Apache-2.0
func (in *AuthInfo) DeepCopy() *AuthInfo { if in == nil { return nil } out := new(AuthInfo) in.DeepCopyInto(out) return out }
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthInfo.
DeepCopy
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
Apache-2.0
func (in *AuthProviderConfig) DeepCopyInto(out *AuthProviderConfig) { *out = *in if in.Config != nil { in, out := &in.Config, &out.Config *out = make(map[string]string, len(*in)) for key, val := range *in { (*out)[key] = val } } return }
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DeepCopyInto
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
Apache-2.0
func (in *AuthProviderConfig) DeepCopy() *AuthProviderConfig { if in == nil { return nil } out := new(AuthProviderConfig) in.DeepCopyInto(out) return out }
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthProviderConfig.
DeepCopy
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
Apache-2.0
func (in *Cluster) DeepCopyInto(out *Cluster) { *out = *in if in.CertificateAuthorityData != nil { in, out := &in.CertificateAuthorityData, &out.CertificateAuthorityData *out = make([]byte, len(*in)) copy(*out, *in) } if in.Extensions != nil { in, out := &in.Extensions, &out.Extensions *out = make(map[string]runtime.Object, len(*in)) for key, val := range *in { if val == nil { (*out)[key] = nil } else { (*out)[key] = val.DeepCopyObject() } } } return }
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DeepCopyInto
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
Apache-2.0
func (in *Cluster) DeepCopy() *Cluster { if in == nil { return nil } out := new(Cluster) in.DeepCopyInto(out) return out }
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
DeepCopy
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
Apache-2.0
func (in *Config) DeepCopyInto(out *Config) { *out = *in in.Preferences.DeepCopyInto(&out.Preferences) if in.Clusters != nil { in, out := &in.Clusters, &out.Clusters *out = make(map[string]*Cluster, len(*in)) for key, val := range *in { var outVal *Cluster if val == nil { (*out)[key] = nil } else { in, out := &val, &outVal *out = new(Cluster) (*in).DeepCopyInto(*out) } (*out)[key] = outVal } } if in.AuthInfos != nil { in, out := &in.AuthInfos, &out.AuthInfos *out = make(map[string]*AuthInfo, len(*in)) for key, val := range *in { var outVal *AuthInfo if val == nil { (*out)[key] = nil } else { in, out := &val, &outVal *out = new(AuthInfo) (*in).DeepCopyInto(*out) } (*out)[key] = outVal } } if in.Contexts != nil { in, out := &in.Contexts, &out.Contexts *out = make(map[string]*Context, len(*in)) for key, val := range *in { var outVal *Context if val == nil { (*out)[key] = nil } else { in, out := &val, &outVal *out = new(Context) (*in).DeepCopyInto(*out) } (*out)[key] = outVal } } if in.Extensions != nil { in, out := &in.Extensions, &out.Extensions *out = make(map[string]runtime.Object, len(*in)) for key, val := range *in { if val == nil { (*out)[key] = nil } else { (*out)[key] = val.DeepCopyObject() } } } return }
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DeepCopyInto
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
Apache-2.0
func (in *Config) DeepCopy() *Config { if in == nil { return nil } out := new(Config) in.DeepCopyInto(out) return out }
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.
DeepCopy
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
Apache-2.0
func (in *Config) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil }
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
DeepCopyObject
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
Apache-2.0
func (in *Context) DeepCopyInto(out *Context) { *out = *in if in.Extensions != nil { in, out := &in.Extensions, &out.Extensions *out = make(map[string]runtime.Object, len(*in)) for key, val := range *in { if val == nil { (*out)[key] = nil } else { (*out)[key] = val.DeepCopyObject() } } } return }
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DeepCopyInto
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
Apache-2.0
func (in *Context) DeepCopy() *Context { if in == nil { return nil } out := new(Context) in.DeepCopyInto(out) return out }
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Context.
DeepCopy
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
Apache-2.0
func (in *ExecConfig) DeepCopyInto(out *ExecConfig) { *out = *in if in.Args != nil { in, out := &in.Args, &out.Args *out = make([]string, len(*in)) copy(*out, *in) } if in.Env != nil { in, out := &in.Env, &out.Env *out = make([]ExecEnvVar, len(*in)) copy(*out, *in) } if in.Config != nil { out.Config = in.Config.DeepCopyObject() } return }
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DeepCopyInto
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
Apache-2.0
func (in *ExecConfig) DeepCopy() *ExecConfig { if in == nil { return nil } out := new(ExecConfig) in.DeepCopyInto(out) return out }
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecConfig.
DeepCopy
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
Apache-2.0
func (in *ExecEnvVar) DeepCopyInto(out *ExecEnvVar) { *out = *in return }
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DeepCopyInto
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
Apache-2.0
func (in *ExecEnvVar) DeepCopy() *ExecEnvVar { if in == nil { return nil } out := new(ExecEnvVar) in.DeepCopyInto(out) return out }
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecEnvVar.
DeepCopy
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
Apache-2.0
func (in *Preferences) DeepCopyInto(out *Preferences) { *out = *in if in.Extensions != nil { in, out := &in.Extensions, &out.Extensions *out = make(map[string]runtime.Object, len(*in)) for key, val := range *in { if val == nil { (*out)[key] = nil } else { (*out)[key] = val.DeepCopyObject() } } } return }
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DeepCopyInto
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
Apache-2.0
func (in *Preferences) DeepCopy() *Preferences { if in == nil { return nil } out := new(Preferences) in.DeepCopyInto(out) return out }
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Preferences.
DeepCopy
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go
Apache-2.0
func IsConfigEmpty(config *Config) bool { return len(config.AuthInfos) == 0 && len(config.Clusters) == 0 && len(config.Contexts) == 0 && len(config.CurrentContext) == 0 && len(config.Preferences.Extensions) == 0 && !config.Preferences.Colors && len(config.Extensions) == 0 }
IsConfigEmpty returns true if the config is empty.
IsConfigEmpty
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go
Apache-2.0
func MinifyConfig(config *Config) error { if len(config.CurrentContext) == 0 { return errors.New("current-context must exist in order to minify") } currContext, exists := config.Contexts[config.CurrentContext] if !exists { return fmt.Errorf("cannot locate context %v", config.CurrentContext) } newContexts := map[string]*Context{} newContexts[config.CurrentContext] = currContext newClusters := map[string]*Cluster{} if len(currContext.Cluster) > 0 { if _, exists := config.Clusters[currContext.Cluster]; !exists { return fmt.Errorf("cannot locate cluster %v", currContext.Cluster) } newClusters[currContext.Cluster] = config.Clusters[currContext.Cluster] } newAuthInfos := map[string]*AuthInfo{} if len(currContext.AuthInfo) > 0 { if _, exists := config.AuthInfos[currContext.AuthInfo]; !exists { return fmt.Errorf("cannot locate user %v", currContext.AuthInfo) } newAuthInfos[currContext.AuthInfo] = config.AuthInfos[currContext.AuthInfo] } config.AuthInfos = newAuthInfos config.Clusters = newClusters config.Contexts = newContexts return nil }
MinifyConfig read the current context and uses that to keep only the relevant pieces of config This is useful for making secrets based on kubeconfig files
MinifyConfig
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go
Apache-2.0
func ShortenConfig(config *Config) { // trick json encoder into printing a human-readable string in the raw data // by base64 decoding what we want to print. Relies on implementation of // http://golang.org/pkg/encoding/json/#Marshal using base64 to encode []byte for key, authInfo := range config.AuthInfos { if len(authInfo.ClientKeyData) > 0 { authInfo.ClientKeyData = dataOmittedBytes } if len(authInfo.ClientCertificateData) > 0 { authInfo.ClientCertificateData = dataOmittedBytes } if len(authInfo.Token) > 0 { authInfo.Token = "REDACTED" } config.AuthInfos[key] = authInfo } for key, cluster := range config.Clusters { if len(cluster.CertificateAuthorityData) > 0 { cluster.CertificateAuthorityData = dataOmittedBytes } config.Clusters[key] = cluster } }
ShortenConfig redacts raw data entries from the config object for a human-readable view.
ShortenConfig
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go
Apache-2.0
func FlattenConfig(config *Config) error { for key, authInfo := range config.AuthInfos { baseDir, err := MakeAbs(path.Dir(authInfo.LocationOfOrigin), "") if err != nil { return err } if err := FlattenContent(&authInfo.ClientCertificate, &authInfo.ClientCertificateData, baseDir); err != nil { return err } if err := FlattenContent(&authInfo.ClientKey, &authInfo.ClientKeyData, baseDir); err != nil { return err } config.AuthInfos[key] = authInfo } for key, cluster := range config.Clusters { baseDir, err := MakeAbs(path.Dir(cluster.LocationOfOrigin), "") if err != nil { return err } if err := FlattenContent(&cluster.CertificateAuthority, &cluster.CertificateAuthorityData, baseDir); err != nil { return err } config.Clusters[key] = cluster } return nil }
FlattenConfig changes the config object into a self-contained config (useful for making secrets)
FlattenConfig
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go
Apache-2.0
func ResolvePath(path string, base string) string { // Don't resolve empty paths if len(path) > 0 { // Don't resolve absolute paths if !filepath.IsAbs(path) { return filepath.Join(base, path) } } return path }
ResolvePath returns the path as an absolute paths, relative to the given base directory
ResolvePath
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go
Apache-2.0
func RedactSecrets(config *Config) error { return redactSecrets(reflect.ValueOf(config), false) }
RedactSecrets replaces any sensitive values with REDACTED
RedactSecrets
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go
Apache-2.0
func RegisterDefaults(scheme *runtime.Scheme) error { scheme.AddTypeDefaultingFunc(&Config{}, func(obj interface{}) { SetObjectDefaults_Config(obj.(*Config)) }) return nil }
RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.
RegisterDefaults
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.defaults.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.defaults.go
Apache-2.0
func (in *AuthInfo) DeepCopyInto(out *AuthInfo) { *out = *in if in.ClientCertificateData != nil { in, out := &in.ClientCertificateData, &out.ClientCertificateData *out = make([]byte, len(*in)) copy(*out, *in) } if in.ClientKeyData != nil { in, out := &in.ClientKeyData, &out.ClientKeyData *out = make([]byte, len(*in)) copy(*out, *in) } if in.ImpersonateGroups != nil { in, out := &in.ImpersonateGroups, &out.ImpersonateGroups *out = make([]string, len(*in)) copy(*out, *in) } if in.ImpersonateUserExtra != nil { in, out := &in.ImpersonateUserExtra, &out.ImpersonateUserExtra *out = make(map[string][]string, len(*in)) for key, val := range *in { var outVal []string if val == nil { (*out)[key] = nil } else { in, out := &val, &outVal *out = make([]string, len(*in)) copy(*out, *in) } (*out)[key] = outVal } } if in.AuthProvider != nil { in, out := &in.AuthProvider, &out.AuthProvider *out = new(AuthProviderConfig) (*in).DeepCopyInto(*out) } if in.Exec != nil { in, out := &in.Exec, &out.Exec *out = new(ExecConfig) (*in).DeepCopyInto(*out) } if in.Extensions != nil { in, out := &in.Extensions, &out.Extensions *out = make([]NamedExtension, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return }
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DeepCopyInto
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *AuthInfo) DeepCopy() *AuthInfo { if in == nil { return nil } out := new(AuthInfo) in.DeepCopyInto(out) return out }
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthInfo.
DeepCopy
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *AuthProviderConfig) DeepCopyInto(out *AuthProviderConfig) { *out = *in if in.Config != nil { in, out := &in.Config, &out.Config *out = make(map[string]string, len(*in)) for key, val := range *in { (*out)[key] = val } } return }
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DeepCopyInto
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *AuthProviderConfig) DeepCopy() *AuthProviderConfig { if in == nil { return nil } out := new(AuthProviderConfig) in.DeepCopyInto(out) return out }
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthProviderConfig.
DeepCopy
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *Cluster) DeepCopyInto(out *Cluster) { *out = *in if in.CertificateAuthorityData != nil { in, out := &in.CertificateAuthorityData, &out.CertificateAuthorityData *out = make([]byte, len(*in)) copy(*out, *in) } if in.Extensions != nil { in, out := &in.Extensions, &out.Extensions *out = make([]NamedExtension, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return }
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DeepCopyInto
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *Cluster) DeepCopy() *Cluster { if in == nil { return nil } out := new(Cluster) in.DeepCopyInto(out) return out }
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
DeepCopy
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *Config) DeepCopyInto(out *Config) { *out = *in in.Preferences.DeepCopyInto(&out.Preferences) if in.Clusters != nil { in, out := &in.Clusters, &out.Clusters *out = make([]NamedCluster, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.AuthInfos != nil { in, out := &in.AuthInfos, &out.AuthInfos *out = make([]NamedAuthInfo, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.Contexts != nil { in, out := &in.Contexts, &out.Contexts *out = make([]NamedContext, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.Extensions != nil { in, out := &in.Extensions, &out.Extensions *out = make([]NamedExtension, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return }
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DeepCopyInto
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *Config) DeepCopy() *Config { if in == nil { return nil } out := new(Config) in.DeepCopyInto(out) return out }
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config.
DeepCopy
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *Config) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil }
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
DeepCopyObject
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *Context) DeepCopyInto(out *Context) { *out = *in if in.Extensions != nil { in, out := &in.Extensions, &out.Extensions *out = make([]NamedExtension, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return }
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DeepCopyInto
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *Context) DeepCopy() *Context { if in == nil { return nil } out := new(Context) in.DeepCopyInto(out) return out }
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Context.
DeepCopy
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *ExecConfig) DeepCopyInto(out *ExecConfig) { *out = *in if in.Args != nil { in, out := &in.Args, &out.Args *out = make([]string, len(*in)) copy(*out, *in) } if in.Env != nil { in, out := &in.Env, &out.Env *out = make([]ExecEnvVar, len(*in)) copy(*out, *in) } return }
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DeepCopyInto
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *ExecConfig) DeepCopy() *ExecConfig { if in == nil { return nil } out := new(ExecConfig) in.DeepCopyInto(out) return out }
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecConfig.
DeepCopy
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *ExecEnvVar) DeepCopyInto(out *ExecEnvVar) { *out = *in return }
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DeepCopyInto
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *ExecEnvVar) DeepCopy() *ExecEnvVar { if in == nil { return nil } out := new(ExecEnvVar) in.DeepCopyInto(out) return out }
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecEnvVar.
DeepCopy
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *NamedAuthInfo) DeepCopyInto(out *NamedAuthInfo) { *out = *in in.AuthInfo.DeepCopyInto(&out.AuthInfo) return }
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DeepCopyInto
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *NamedAuthInfo) DeepCopy() *NamedAuthInfo { if in == nil { return nil } out := new(NamedAuthInfo) in.DeepCopyInto(out) return out }
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedAuthInfo.
DeepCopy
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *NamedCluster) DeepCopyInto(out *NamedCluster) { *out = *in in.Cluster.DeepCopyInto(&out.Cluster) return }
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DeepCopyInto
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *NamedCluster) DeepCopy() *NamedCluster { if in == nil { return nil } out := new(NamedCluster) in.DeepCopyInto(out) return out }
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedCluster.
DeepCopy
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *NamedContext) DeepCopyInto(out *NamedContext) { *out = *in in.Context.DeepCopyInto(&out.Context) return }
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DeepCopyInto
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *NamedContext) DeepCopy() *NamedContext { if in == nil { return nil } out := new(NamedContext) in.DeepCopyInto(out) return out }
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedContext.
DeepCopy
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *NamedExtension) DeepCopyInto(out *NamedExtension) { *out = *in in.Extension.DeepCopyInto(&out.Extension) return }
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DeepCopyInto
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *NamedExtension) DeepCopy() *NamedExtension { if in == nil { return nil } out := new(NamedExtension) in.DeepCopyInto(out) return out }
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedExtension.
DeepCopy
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *Preferences) DeepCopyInto(out *Preferences) { *out = *in if in.Extensions != nil { in, out := &in.Extensions, &out.Extensions *out = make([]NamedExtension, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return }
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
DeepCopyInto
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func (in *Preferences) DeepCopy() *Preferences { if in == nil { return nil } out := new(Preferences) in.DeepCopyInto(out) return out }
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Preferences.
DeepCopy
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go
Apache-2.0
func RegisterConversions(s *runtime.Scheme) error { if err := s.AddGeneratedConversionFunc((*AuthInfo)(nil), (*api.AuthInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_AuthInfo_To_api_AuthInfo(a.(*AuthInfo), b.(*api.AuthInfo), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*api.AuthInfo)(nil), (*AuthInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_api_AuthInfo_To_v1_AuthInfo(a.(*api.AuthInfo), b.(*AuthInfo), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*AuthProviderConfig)(nil), (*api.AuthProviderConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_AuthProviderConfig_To_api_AuthProviderConfig(a.(*AuthProviderConfig), b.(*api.AuthProviderConfig), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*api.AuthProviderConfig)(nil), (*AuthProviderConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_api_AuthProviderConfig_To_v1_AuthProviderConfig(a.(*api.AuthProviderConfig), b.(*AuthProviderConfig), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*Cluster)(nil), (*api.Cluster)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_Cluster_To_api_Cluster(a.(*Cluster), b.(*api.Cluster), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*api.Cluster)(nil), (*Cluster)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_api_Cluster_To_v1_Cluster(a.(*api.Cluster), b.(*Cluster), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*Config)(nil), (*api.Config)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_Config_To_api_Config(a.(*Config), b.(*api.Config), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*api.Config)(nil), (*Config)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_api_Config_To_v1_Config(a.(*api.Config), b.(*Config), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*Context)(nil), (*api.Context)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_Context_To_api_Context(a.(*Context), b.(*api.Context), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*api.Context)(nil), (*Context)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_api_Context_To_v1_Context(a.(*api.Context), b.(*Context), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*ExecConfig)(nil), (*api.ExecConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_ExecConfig_To_api_ExecConfig(a.(*ExecConfig), b.(*api.ExecConfig), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*api.ExecConfig)(nil), (*ExecConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_api_ExecConfig_To_v1_ExecConfig(a.(*api.ExecConfig), b.(*ExecConfig), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*ExecEnvVar)(nil), (*api.ExecEnvVar)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_ExecEnvVar_To_api_ExecEnvVar(a.(*ExecEnvVar), b.(*api.ExecEnvVar), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*api.ExecEnvVar)(nil), (*ExecEnvVar)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_api_ExecEnvVar_To_v1_ExecEnvVar(a.(*api.ExecEnvVar), b.(*ExecEnvVar), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*Preferences)(nil), (*api.Preferences)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1_Preferences_To_api_Preferences(a.(*Preferences), b.(*api.Preferences), scope) }); err != nil { return err } if err := s.AddGeneratedConversionFunc((*api.Preferences)(nil), (*Preferences)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_api_Preferences_To_v1_Preferences(a.(*api.Preferences), b.(*Preferences), scope) }); err != nil { return err } if err := s.AddConversionFunc((*map[string]*api.AuthInfo)(nil), (*[]NamedAuthInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_Map_string_To_Pointer_api_AuthInfo_To_Slice_v1_NamedAuthInfo(a.(*map[string]*api.AuthInfo), b.(*[]NamedAuthInfo), scope) }); err != nil { return err } if err := s.AddConversionFunc((*map[string]*api.Cluster)(nil), (*[]NamedCluster)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_Map_string_To_Pointer_api_Cluster_To_Slice_v1_NamedCluster(a.(*map[string]*api.Cluster), b.(*[]NamedCluster), scope) }); err != nil { return err } if err := s.AddConversionFunc((*map[string]*api.Context)(nil), (*[]NamedContext)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_Map_string_To_Pointer_api_Context_To_Slice_v1_NamedContext(a.(*map[string]*api.Context), b.(*[]NamedContext), scope) }); err != nil { return err } if err := s.AddConversionFunc((*map[string]runtime.Object)(nil), (*[]NamedExtension)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_Map_string_To_runtime_Object_To_Slice_v1_NamedExtension(a.(*map[string]runtime.Object), b.(*[]NamedExtension), scope) }); err != nil { return err } if err := s.AddConversionFunc((*[]NamedAuthInfo)(nil), (*map[string]*api.AuthInfo)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_Slice_v1_NamedAuthInfo_To_Map_string_To_Pointer_api_AuthInfo(a.(*[]NamedAuthInfo), b.(*map[string]*api.AuthInfo), scope) }); err != nil { return err } if err := s.AddConversionFunc((*[]NamedCluster)(nil), (*map[string]*api.Cluster)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_Slice_v1_NamedCluster_To_Map_string_To_Pointer_api_Cluster(a.(*[]NamedCluster), b.(*map[string]*api.Cluster), scope) }); err != nil { return err } if err := s.AddConversionFunc((*[]NamedContext)(nil), (*map[string]*api.Context)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_Slice_v1_NamedContext_To_Map_string_To_Pointer_api_Context(a.(*[]NamedContext), b.(*map[string]*api.Context), scope) }); err != nil { return err } if err := s.AddConversionFunc((*[]NamedExtension)(nil), (*map[string]runtime.Object)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_Slice_v1_NamedExtension_To_Map_string_To_runtime_Object(a.(*[]NamedExtension), b.(*map[string]runtime.Object), scope) }); err != nil { return err } return nil }
RegisterConversions adds conversion functions to the given scheme. Public to allow building arbitrary schemes.
RegisterConversions
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
Apache-2.0
func Convert_v1_AuthInfo_To_api_AuthInfo(in *AuthInfo, out *api.AuthInfo, s conversion.Scope) error { return autoConvert_v1_AuthInfo_To_api_AuthInfo(in, out, s) }
Convert_v1_AuthInfo_To_api_AuthInfo is an autogenerated conversion function.
Convert_v1_AuthInfo_To_api_AuthInfo
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
Apache-2.0
func Convert_api_AuthInfo_To_v1_AuthInfo(in *api.AuthInfo, out *AuthInfo, s conversion.Scope) error { return autoConvert_api_AuthInfo_To_v1_AuthInfo(in, out, s) }
Convert_api_AuthInfo_To_v1_AuthInfo is an autogenerated conversion function.
Convert_api_AuthInfo_To_v1_AuthInfo
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
Apache-2.0
func Convert_v1_AuthProviderConfig_To_api_AuthProviderConfig(in *AuthProviderConfig, out *api.AuthProviderConfig, s conversion.Scope) error { return autoConvert_v1_AuthProviderConfig_To_api_AuthProviderConfig(in, out, s) }
Convert_v1_AuthProviderConfig_To_api_AuthProviderConfig is an autogenerated conversion function.
Convert_v1_AuthProviderConfig_To_api_AuthProviderConfig
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
Apache-2.0
func Convert_api_AuthProviderConfig_To_v1_AuthProviderConfig(in *api.AuthProviderConfig, out *AuthProviderConfig, s conversion.Scope) error { return autoConvert_api_AuthProviderConfig_To_v1_AuthProviderConfig(in, out, s) }
Convert_api_AuthProviderConfig_To_v1_AuthProviderConfig is an autogenerated conversion function.
Convert_api_AuthProviderConfig_To_v1_AuthProviderConfig
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
Apache-2.0
func Convert_v1_Cluster_To_api_Cluster(in *Cluster, out *api.Cluster, s conversion.Scope) error { return autoConvert_v1_Cluster_To_api_Cluster(in, out, s) }
Convert_v1_Cluster_To_api_Cluster is an autogenerated conversion function.
Convert_v1_Cluster_To_api_Cluster
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
Apache-2.0
func Convert_api_Cluster_To_v1_Cluster(in *api.Cluster, out *Cluster, s conversion.Scope) error { return autoConvert_api_Cluster_To_v1_Cluster(in, out, s) }
Convert_api_Cluster_To_v1_Cluster is an autogenerated conversion function.
Convert_api_Cluster_To_v1_Cluster
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
Apache-2.0
func Convert_v1_Config_To_api_Config(in *Config, out *api.Config, s conversion.Scope) error { return autoConvert_v1_Config_To_api_Config(in, out, s) }
Convert_v1_Config_To_api_Config is an autogenerated conversion function.
Convert_v1_Config_To_api_Config
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
Apache-2.0
func Convert_api_Config_To_v1_Config(in *api.Config, out *Config, s conversion.Scope) error { return autoConvert_api_Config_To_v1_Config(in, out, s) }
Convert_api_Config_To_v1_Config is an autogenerated conversion function.
Convert_api_Config_To_v1_Config
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
Apache-2.0
func Convert_v1_Context_To_api_Context(in *Context, out *api.Context, s conversion.Scope) error { return autoConvert_v1_Context_To_api_Context(in, out, s) }
Convert_v1_Context_To_api_Context is an autogenerated conversion function.
Convert_v1_Context_To_api_Context
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
Apache-2.0
func Convert_api_Context_To_v1_Context(in *api.Context, out *Context, s conversion.Scope) error { return autoConvert_api_Context_To_v1_Context(in, out, s) }
Convert_api_Context_To_v1_Context is an autogenerated conversion function.
Convert_api_Context_To_v1_Context
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
Apache-2.0
func Convert_v1_ExecConfig_To_api_ExecConfig(in *ExecConfig, out *api.ExecConfig, s conversion.Scope) error { return autoConvert_v1_ExecConfig_To_api_ExecConfig(in, out, s) }
Convert_v1_ExecConfig_To_api_ExecConfig is an autogenerated conversion function.
Convert_v1_ExecConfig_To_api_ExecConfig
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
Apache-2.0
func Convert_api_ExecConfig_To_v1_ExecConfig(in *api.ExecConfig, out *ExecConfig, s conversion.Scope) error { return autoConvert_api_ExecConfig_To_v1_ExecConfig(in, out, s) }
Convert_api_ExecConfig_To_v1_ExecConfig is an autogenerated conversion function.
Convert_api_ExecConfig_To_v1_ExecConfig
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
Apache-2.0
func Convert_v1_ExecEnvVar_To_api_ExecEnvVar(in *ExecEnvVar, out *api.ExecEnvVar, s conversion.Scope) error { return autoConvert_v1_ExecEnvVar_To_api_ExecEnvVar(in, out, s) }
Convert_v1_ExecEnvVar_To_api_ExecEnvVar is an autogenerated conversion function.
Convert_v1_ExecEnvVar_To_api_ExecEnvVar
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
Apache-2.0
func Convert_api_ExecEnvVar_To_v1_ExecEnvVar(in *api.ExecEnvVar, out *ExecEnvVar, s conversion.Scope) error { return autoConvert_api_ExecEnvVar_To_v1_ExecEnvVar(in, out, s) }
Convert_api_ExecEnvVar_To_v1_ExecEnvVar is an autogenerated conversion function.
Convert_api_ExecEnvVar_To_v1_ExecEnvVar
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
Apache-2.0
func Convert_v1_Preferences_To_api_Preferences(in *Preferences, out *api.Preferences, s conversion.Scope) error { return autoConvert_v1_Preferences_To_api_Preferences(in, out, s) }
Convert_v1_Preferences_To_api_Preferences is an autogenerated conversion function.
Convert_v1_Preferences_To_api_Preferences
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
Apache-2.0
func Convert_api_Preferences_To_v1_Preferences(in *api.Preferences, out *Preferences, s conversion.Scope) error { return autoConvert_api_Preferences_To_v1_Preferences(in, out, s) }
Convert_api_Preferences_To_v1_Preferences is an autogenerated conversion function.
Convert_api_Preferences_To_v1_Preferences
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.conversion.go
Apache-2.0
func NewEventRecorderAdapter(recorder EventRecorderLogger) *EventRecorderAdapter { return &EventRecorderAdapter{ recorder: recorder, } }
NewEventRecorderAdapter returns an adapter implementing the new "k8s.io/client-go/tools/events".EventRecorder interface.
NewEventRecorderAdapter
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/record/event.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/record/event.go
Apache-2.0
func (a *EventRecorderAdapter) Eventf(regarding, _ runtime.Object, eventtype, reason, action, note string, args ...interface{}) { a.recorder.Eventf(regarding, eventtype, reason, note, args...) }
Eventf is a wrapper around v1 Eventf
Eventf
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/record/event.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/record/event.go
Apache-2.0
func NewBroadcaster(opts ...BroadcasterOption) EventBroadcaster { c := config{ sleepDuration: defaultSleepDuration, } for _, opt := range opts { opt(&c) } eventBroadcaster := &eventBroadcasterImpl{ Broadcaster: watch.NewLongQueueBroadcaster(maxQueuedEvents, watch.DropIfChannelFull), sleepDuration: c.sleepDuration, options: c.CorrelatorOptions, } ctx := c.Context if ctx == nil { ctx = context.Background() } else { // Calling Shutdown is not required when a context was provided: // when the context is canceled, this goroutine will shut down // the broadcaster. go func() { <-ctx.Done() eventBroadcaster.Broadcaster.Shutdown() }() } eventBroadcaster.cancelationCtx, eventBroadcaster.cancel = context.WithCancel(ctx) return eventBroadcaster }
Creates a new event broadcaster.
NewBroadcaster
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/record/event.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/record/event.go
Apache-2.0
func WithContext(ctx context.Context) BroadcasterOption { return func(c *config) { c.Context = ctx } }
WithContext sets a context for the broadcaster. Canceling the context will shut down the broadcaster, Shutdown doesn't need to be called. The context can also be used to provide a logger.
WithContext
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/record/event.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/record/event.go
Apache-2.0
func (e *eventBroadcasterImpl) StartRecordingToSink(sink EventSink) watch.Interface { eventCorrelator := NewEventCorrelatorWithOptions(e.options) return e.StartEventWatcher( func(event *v1.Event) { e.recordToSink(sink, event, eventCorrelator) }) }
StartRecordingToSink starts sending events received from the specified eventBroadcaster to the given sink. The return value can be ignored or used to stop recording, if desired. TODO: make me an object with parameterizable queue length and retry interval
StartRecordingToSink
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/record/event.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/record/event.go
Apache-2.0
func recordEvent(ctx context.Context, sink EventSink, event *v1.Event, patch []byte, updateExistingEvent bool, eventCorrelator *EventCorrelator) bool { var newEvent *v1.Event var err error if updateExistingEvent { newEvent, err = sink.Patch(event, patch) } // Update can fail because the event may have been removed and it no longer exists. if !updateExistingEvent || (updateExistingEvent && util.IsKeyNotFoundError(err)) { // Making sure that ResourceVersion is empty on creation event.ResourceVersion = "" newEvent, err = sink.Create(event) } if err == nil { // we need to update our event correlator with the server returned state to handle name/resourceversion eventCorrelator.UpdateState(newEvent) return true } // If we can't contact the server, then hold everything while we keep trying. // Otherwise, something about the event is malformed and we should abandon it. switch err.(type) { case *restclient.RequestConstructionError: // We will construct the request the same next time, so don't keep trying. klog.FromContext(ctx).Error(err, "Unable to construct event (will not retry!)", "event", event) return true case *errors.StatusError: if errors.IsAlreadyExists(err) || errors.HasStatusCause(err, v1.NamespaceTerminatingCause) { klog.FromContext(ctx).V(5).Info("Server rejected event (will not retry!)", "event", event, "err", err) } else { klog.FromContext(ctx).Error(err, "Server rejected event (will not retry!)", "event", event) } return true case *errors.UnexpectedObjectError: // We don't expect this; it implies the server's response didn't match a // known pattern. Go ahead and retry. default: // This case includes actual http transport errors. Go ahead and retry. }
recordEvent attempts to write event to a sink. It returns true if the event was successfully recorded or discarded, false if it should be retried. If updateExistingEvent is false, it creates a new event, otherwise it updates existing event.
recordEvent
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/record/event.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/record/event.go
Apache-2.0
func NewFakeRecorder(bufferSize int) *FakeRecorder { return &FakeRecorder{ Events: make(chan string, bufferSize), } }
NewFakeRecorder creates new fake event recorder with event channel with buffer of given size.
NewFakeRecorder
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/record/fake.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/record/fake.go
Apache-2.0
func getEventKey(event *v1.Event) string { return strings.Join([]string{ event.Source.Component, event.Source.Host, event.InvolvedObject.Kind, event.InvolvedObject.Namespace, event.InvolvedObject.Name, event.InvolvedObject.FieldPath, string(event.InvolvedObject.UID), event.InvolvedObject.APIVersion, event.Type, event.Reason, event.Message, }, "") }
getEventKey builds unique event key based on source, involvedObject, reason, message
getEventKey
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/record/events_cache.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/record/events_cache.go
Apache-2.0
func getSpamKey(event *v1.Event) string { return strings.Join([]string{ event.Source.Component, event.Source.Host, event.InvolvedObject.Kind, event.InvolvedObject.Namespace, event.InvolvedObject.Name, string(event.InvolvedObject.UID), event.InvolvedObject.APIVersion, }, "") }
getSpamKey builds unique event key based on source, involvedObject
getSpamKey
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/record/events_cache.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/record/events_cache.go
Apache-2.0
func NewEventSourceObjectSpamFilter(lruCacheSize, burst int, qps float32, clock clock.PassiveClock, spamKeyFunc EventSpamKeyFunc) *EventSourceObjectSpamFilter { return &EventSourceObjectSpamFilter{ cache: lru.New(lruCacheSize), burst: burst, qps: qps, clock: clock, spamKeyFunc: spamKeyFunc, } }
NewEventSourceObjectSpamFilter allows burst events from a source about an object with the specified qps refill.
NewEventSourceObjectSpamFilter
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/record/events_cache.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/record/events_cache.go
Apache-2.0
func (f *EventSourceObjectSpamFilter) Filter(event *v1.Event) bool { var record spamRecord // controls our cached information about this event eventKey := f.spamKeyFunc(event) // do we have a record of similar events in our cache? f.Lock() defer f.Unlock() value, found := f.cache.Get(eventKey) if found { record = value.(spamRecord) } // verify we have a rate limiter for this record if record.rateLimiter == nil { record.rateLimiter = flowcontrol.NewTokenBucketPassiveRateLimiterWithClock(f.qps, f.burst, f.clock) } // ensure we have available rate filter := !record.rateLimiter.TryAccept() // update the cache f.cache.Add(eventKey, record) return filter }
Filter controls that a given source+object are not exceeding the allowed rate.
Filter
go
k8snetworkplumbingwg/multus-cni
vendor/k8s.io/client-go/tools/record/events_cache.go
https://github.com/k8snetworkplumbingwg/multus-cni/blob/master/vendor/k8s.io/client-go/tools/record/events_cache.go
Apache-2.0