Versions in this module Expand all Collapse all v0 v0.0.1 Apr 13, 2023 Changes in this version + const DefaultBurst + const DefaultQPS + var ErrNotInCluster = errors.New(...) + var NameMayNotBe = []string + var NameMayNotContain = []string + func ConfigToExecCluster(config *Config) (*clientauthenticationapi.Cluster, error) + func DefaultKubernetesUserAgent() string + func DefaultServerURL(host, apiPath string, defaultTLS bool) (*url.URL, string, error) + func DefaultVersionedAPIPath(apiPath string) string + func HTTPClientFor(config *Config) (*http.Client, error) + func HTTPWrappersForConfig(config *Config, rt http.RoundTripper) (http.RoundTripper, error) + func IsConfigTransportTLS(config Config) bool + func IsValidPathSegmentName(name string) []string + func IsValidPathSegmentPrefix(name string) []string + func LoadTLSFiles(c *Config) error + func NewWarningWriter(out io.Writer, opts WarningWriterOptions) *warningWriter + func RegisterAuthProviderPlugin(name string, plugin Factory) error + func SetDefaultWarningHandler(l WarningHandler) + func SetKubernetesDefaults(config *Config) error + func TLSConfigFor(config *Config) (*tls.Config, error) + func TransportFor(config *Config) (http.RoundTripper, error) + func ValidatePathSegmentName(name string, prefix bool) []string + type AuthProvider interface + Login func() error + WrapTransport func(http.RoundTripper) http.RoundTripper + func GetAuthProvider(clusterAddress string, apc *clientcmdapi.AuthProviderConfig, ...) (AuthProvider, error) + type AuthProviderConfigPersister interface + Persist func(map[string]string) error + type BackoffManager interface + CalculateBackoff func(actualUrl *url.URL) time.Duration + Sleep func(d time.Duration) + UpdateBackoff func(actualUrl *url.URL, err error, responseCode int) + type ClientContentConfig struct + AcceptContentTypes string + ContentType string + Negotiator runtime.ClientNegotiator + type Config struct + APIPath string + AuthConfigPersister AuthProviderConfigPersister + AuthProvider *clientcmdapi.AuthProviderConfig + BearerToken string + BearerTokenFile string + Burst int + Dial func(ctx context.Context, network, address string) (net.Conn, error) + DisableCompression bool + ExecProvider *clientcmdapi.ExecConfig + Host string + Impersonate ImpersonationConfig + Password string + Proxy func(*http.Request) (*url.URL, error) + QPS float32 + RateLimiter flowcontrol.RateLimiter + Timeout time.Duration + Transport http.RoundTripper + UserAgent string + Username string + WarningHandler WarningHandler + WrapTransport transport.WrapperFunc + func AddUserAgent(config *Config, userAgent string) *Config + func AnonymousClientConfig(config *Config) *Config + func CopyConfig(config *Config) *Config + func ExecClusterToConfig(cluster *clientauthenticationapi.Cluster) (*Config, error) + func InClusterConfig() (*Config, error) + func (c *Config) GoString() string + func (c *Config) String() string + func (c *Config) TransportConfig() (*transport.Config, error) + func (c *Config) Wrap(fn transport.WrapperFunc) + type ContentConfig struct + AcceptContentTypes string + ContentType string + NegotiatedSerializer runtime.NegotiatedSerializer + type Factory func(clusterAddress string, config map[string]string, ...) (AuthProvider, error) + type HTTPClient interface + Do func(req *http.Request) (*http.Response, error) + type ImpersonationConfig struct + Extra map[string][]string + Groups []string + UID string + UserName string + type Interface interface + Delete func() *Request + Get func() *Request + GetRateLimiter func() flowcontrol.RateLimiter + Patch func(pt api.PatchType) *Request + Post func() *Request + Put func() *Request + Verb func(verb string) *Request + type IsRetryableErrorFunc func(request *http.Request, err error) bool + func (r IsRetryableErrorFunc) IsErrorRetryable(request *http.Request, err error) bool + type NoBackoff struct + func (n *NoBackoff) CalculateBackoff(actualUrl *url.URL) time.Duration + func (n *NoBackoff) Sleep(d time.Duration) + func (n *NoBackoff) UpdateBackoff(actualUrl *url.URL, err error, responseCode int) + type NoWarnings struct + func (NoWarnings) HandleWarningHeader(code int, agent string, message string) + type RESTClient struct + Client *http.Client + func NewRESTClient(baseURL *url.URL, versionedAPIPath string, config ClientContentConfig, ...) (*RESTClient, error) + func RESTClientFor(config *Config) (*RESTClient, error) + func RESTClientForConfigAndClient(config *Config, httpClient *http.Client) (*RESTClient, error) + func UnversionedRESTClientFor(config *Config) (*RESTClient, error) + func UnversionedRESTClientForConfigAndClient(config *Config, httpClient *http.Client) (*RESTClient, error) + func (c *RESTClient) Delete() *Request + func (c *RESTClient) Get() *Request + func (c *RESTClient) GetRateLimiter() flowcontrol.RateLimiter + func (c *RESTClient) Patch(pt api.PatchType) *Request + func (c *RESTClient) Post() *Request + func (c *RESTClient) Put() *Request + func (c *RESTClient) Verb(verb string) *Request + type Request struct + func NewRequest(c *RESTClient) *Request + func NewRequestWithClient(base *url.URL, versionedAPIPath string, content ClientContentConfig, ...) *Request + func (r *Request) AbsPath(segments ...string) *Request + func (r *Request) BackOff(manager BackoffManager) *Request + func (r *Request) Body(obj interface{}) *Request + func (r *Request) Debug() *Request + func (r *Request) Do(ctx context.Context) Result + func (r *Request) DoRaw(ctx context.Context) ([]byte, error) + func (r *Request) MaxRetries(maxRetries int) *Request + func (r *Request) Name(resourceName string) *Request + func (r *Request) Namespace(namespace string) *Request + func (r *Request) NamespaceIfScoped(namespace string, scoped bool) *Request + func (r *Request) Param(paramName, s string) *Request + func (r *Request) Prefix(segments ...string) *Request + func (r *Request) RequestURI(uri string) *Request + func (r *Request) Resource(resource string) *Request + func (r *Request) SetHeader(key string, values ...string) *Request + func (r *Request) SetPath(pathName, value string) *Request + func (r *Request) SpecificallyVersionedParams(obj runtime.Object, codec api.ParameterCodec) *Request + func (r *Request) Stream(ctx context.Context) (io.ReadCloser, error) + func (r *Request) SubResource(subresources ...string) *Request + func (r *Request) Suffix(segments ...string) *Request + func (r *Request) Throttle(limiter flowcontrol.RateLimiter) *Request + func (r *Request) Timeout(d time.Duration) *Request + func (r *Request) URL() *url.URL + func (r *Request) Verb(verb string) *Request + func (r *Request) VersionedParams(obj runtime.Object, codec api.ParameterCodec) *Request + func (r *Request) WarningHandler(handler WarningHandler) *Request + func (r *Request) Watch(ctx context.Context, obj interface{}) (watch.Interface, error) + type RequestConstructionError struct + Err error + func (r *RequestConstructionError) Error() string + type ResponseWrapper interface + DoRaw func(context.Context) ([]byte, error) + Stream func(context.Context) (io.ReadCloser, error) + type Result struct + func (r Result) ContentType(contentType *string) Result + func (r Result) Error() error + func (r Result) Get() (runtime.Object, error) + func (r Result) Into(obj runtime.Object) error + func (r Result) JsonInto(obj runtime.Object) error + func (r Result) Raw() ([]byte, error) + func (r Result) StatusCode(statusCode *int) Result + func (r Result) Warnings() []net.WarningHeader + func (r Result) WasCreated(wasCreated *bool) Result + type RetryAfter struct + Attempt int + Reason string + Wait time.Duration + type TLSClientConfig struct + CAData []byte + CAFile string + CertData []byte + CertFile string + Insecure bool + KeyData []byte + KeyFile string + NextProtos []string + ServerName string + func (c TLSClientConfig) GoString() string + func (c TLSClientConfig) String() string + type URLBackoff struct + Backoff *flowcontrol.Backoff + func (b *URLBackoff) CalculateBackoff(actualUrl *url.URL) time.Duration + func (b *URLBackoff) Disable() + func (b *URLBackoff) Sleep(d time.Duration) + func (b *URLBackoff) UpdateBackoff(actualUrl *url.URL, err error, responseCode int) + type WarningHandler interface + HandleWarningHeader func(code int, agent string, text string) + type WarningLogger struct + func (WarningLogger) HandleWarningHeader(code int, agent string, message string) + type WarningWriterOptions struct + Color bool + Deduplicate bool + type WithRetry interface + After func(ctx context.Context, r *Request, resp *http.Response, err error) + Before func(ctx context.Context, r *Request) error + IsNextRetry func(ctx context.Context, restReq *Request, httpReq *http.Request, ...) bool + WrapPreviousError func(finalErr error) (err error)