apiserver

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultLegacyAPIPrefix is where the legacy APIs will be located.
	DefaultLegacyAPIPrefix = "/api"

	// APIGroupPrefix is where non-legacy API group will be located.
	APIGroupPrefix = "/apis"
)

Variables

View Source
var ErrObjectTooLarge = fmt.Errorf("object to decode was longer than maximum allowed size")
View Source
var (
	ListCount = 0
)

Functions

func NewRequestInfoResolver

func NewRequestInfoResolver(o *Options) *apirequest.RequestInfoFactory

func TrimUrl

func TrimUrl(inUrl *url.URL, prePath string) (*url.URL, error)

func WithRequestInfo

func WithRequestInfo(handler http.Handler, resolver request.RequestInfoResolver) http.Handler

WithRequestInfo attaches a RequestInfo to the context.

Types

type Injector

type Injector interface {
	Inject(*http.Request, *request.RequestInfo) error
}

func New

type Options

type Options struct {
	Config               *rest.Config
	SecureServingOptions *options.SecureServingOptions

	RequestInfoResolver    apirequest.RequestInfoResolver
	LegacyAPIGroupPrefixes sets.Set[string]
	LongRunningFunc        apirequest.LongRunningRequestCheck
	HandlerChainWaitGroup  *utilwaitgroup.SafeWaitGroup

	LeaderElectionName string
	SpecManager        *protomanager.SpecManager

	BreakerWrapperFunc        func(http.Handler) http.Handler
	FaultInjectionWrapperFunc func(http.Handler) http.Handler
}

Options contains everything necessary to create and run proxy.

func NewOptions

func NewOptions() *Options

func (*Options) ApplyTo

func (o *Options) ApplyTo(apiserver **server.SecureServingInfo) error

func (*Options) Validate

func (o *Options) Validate() []error

type Proxy

type Proxy struct {
	// contains filtered or unexported fields
}

func NewProxy

func NewProxy(opts *Options) (*Proxy, error)

func (*Proxy) Start

func (p *Proxy) Start(ctx context.Context) (<-chan struct{}, error)

Jump to

Keyboard shortcuts

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