server

package
v1.2.2-rc3 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 48 Imported by: 2

Documentation

Index

Constants

View Source
const (
	RancherKubeConfigSecretName = "rancher-kubeconfig"
	RancherKubeConfigSecretKey  = "kubernetes.kubeconfig"
)

Variables

View Source
var (
	AddToScheme = localSchemeBuilder.AddToScheme
	Scheme      = runtime.NewScheme()
)

Functions

func GetConfig

func GetConfig(kubeConfig string) (clientcmd.ClientConfig, error)

func RancherRESTConfig added in v0.3.0

func RancherRESTConfig(ctx context.Context, restConfig *restclient.Config, options config.Options) (*restclient.Config, error)

func Wait

func Wait(ctx context.Context, config *rest.Config) error

Types

type HarvesterServer

type HarvesterServer struct {
	Context context.Context

	RancherRESTConfig *restclient.Config

	RESTConfig    *restclient.Config
	DynamicClient dynamic.Interface
	ClientSet     *kubernetes.Clientset
	ASL           accesscontrol.AccessSetLookup

	Handler http.Handler
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, clientConfig clientcmd.ClientConfig, options config.Options) (*HarvesterServer, error)

func (*HarvesterServer) ListenAndServe

func (s *HarvesterServer) ListenAndServe(listenerCfg *dynamiclistener.Config, opts config.Options) error

func (*HarvesterServer) Scaled

func (s *HarvesterServer) Scaled() *config.Scaled

Scaled returns the *config.Scaled, it should call after Start.

type PostStartHook

type PostStartHook func(int) error

type Router

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

func NewRouter

func NewRouter(scaled *config.Scaled, restConfig *rest.Config, options config.Options) (*Router, error)

func (*Router) Routes

func (r *Router) Routes(h router.Handlers) http.Handler

Routes adds some customize routes to the default router

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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