apiserver

package
v0.1.3-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 45 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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