proxy

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller syncs Cluster and GlobalResource.

func NewController

func NewController(option NewControllerOption) (*Controller, error)

NewController create a controller for proxy

func (*Controller) Connect

func (ctl *Controller) Connect(ctx context.Context, proxyPath string, responder rest.Responder) (http.Handler, error)

Connect proxy and dispatch handlers

func (*Controller) Hook added in v1.12.0

Hook waits for the controller to be in a storage ready state. Here, even if the initialization is not completed within the timeout interval, nil is still returned because the cache is per-type and per-cluster layer, and we want to avoid making the whole component as not ready, if the request for one of the resource types requires reinitialization, requests for all other resource types can still be handled properly.

func (*Controller) Start

func (ctl *Controller) Start(stopCh <-chan struct{})

Start run the proxy controller

func (*Controller) Stop

func (ctl *Controller) Stop()

Stop shutdown cache

type NewControllerOption added in v1.4.0

type NewControllerOption struct {
	RestConfig *restclient.Config
	RestMapper meta.RESTMapper

	KubeFactory    informers.SharedInformerFactory
	KarmadaFactory informerfactory.SharedInformerFactory

	MinRequestTimeout time.Duration
	// StorageInitializationTimeout defines the maximum amount of time to wait for storage initialization
	// before declaring apiserver ready.
	StorageInitializationTimeout time.Duration

	OutOfTreeRegistry pluginruntime.Registry
}

NewControllerOption is the Option for NewController().

Jump to

Keyboard shortcuts

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