v0.19.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2022 License: Apache-2.0 Imports: 47 Imported by: 0




View Source
const (
	VerbCreate           verb = "create"
	VerbUpdate           verb = "update"
	VerbDelete           verb = "delete"
	VerbDeleteCollection verb = "deletecollection"
	VerbGet              verb = "get"
	VerbList             verb = "list"
	VerbWatch            verb = "watch"
	VerbPatch            verb = "patch"

	VerbProxy verb = "proxy" // proxy unsupported for now


This section is empty.


func AssertSecureConfig added in v0.13.0

func AssertSecureConfig(kubeConfig *restclient.Config) error

func AssertSecureTransport added in v0.13.0

func AssertSecureTransport(rt http.RoundTripper) error

func Secure added in v0.13.0

func SecureAnonymousClientConfig added in v0.13.0

func SecureAnonymousClientConfig(kubeConfig *restclient.Config) *restclient.Config

SecureAnonymousClientConfig has the same properties as restclient.AnonymousClientConfig while still enforcing the secure TLS configuration of the ptls / phttp packages.


type Client

type Client struct {
	Kubernetes         kubernetes.Interface
	Aggregation        aggregatorclient.Interface
	PinnipedConcierge  pinnipedconciergeclientset.Interface
	PinnipedSupervisor pinnipedsupervisorclientset.Interface

	JSONConfig, ProtoConfig *restclient.Config

func New

func New(opts ...Option) (*Client, error)

type Middleware

type Middleware interface {
	Handle(ctx context.Context, rt RoundTrip)

type MiddlewareFunc added in v0.5.0

type MiddlewareFunc func(ctx context.Context, rt RoundTrip)

func (MiddlewareFunc) Handle added in v0.5.0

func (f MiddlewareFunc) Handle(ctx context.Context, rt RoundTrip)

type Middlewares added in v0.5.0

type Middlewares []Middleware

func (Middlewares) Handle added in v0.5.0

func (m Middlewares) Handle(ctx context.Context, rt RoundTrip)

type Object added in v0.5.0

type Object interface {
	runtime.Object // generic access to TypeMeta
	metav1.Object  // generic access to ObjectMeta

type Option

type Option func(*clientConfig)

func WithConfig

func WithConfig(config *restclient.Config) Option

func WithMiddleware

func WithMiddleware(middleware Middleware) Option

func WithTransportWrapper added in v0.5.0

func WithTransportWrapper(wrapper transport.WrapperFunc) Option

WithTransportWrapper will wrap the client-go http.RoundTripper chain *after* the middleware wrapper is applied. I.e., this wrapper has the opportunity to supply an http.RoundTripper that runs first in the client-go http.RoundTripper chain.

type RoundTrip added in v0.5.0

type RoundTrip interface {
	Verb() Verb
	Namespace() string // this is the only valid way to check namespace, Object.GetNamespace() will almost always be empty
	NamespaceScoped() bool
	Resource() schema.GroupVersionResource
	Subresource() string
	MutateRequest(f func(obj Object) error)
	MutateResponse(f func(obj Object) error)

type Verb added in v0.5.0

type Verb interface {
	// contains filtered or unexported methods

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL