server

package
v0.0.2-pre Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2022 License: Apache-2.0 Imports: 44 Imported by: 0

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

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