server

package
v0.0.0-...-43fc03f Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 34 Imported by: 35

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConfigRequired = errors.New("rest config is required")

Functions

func RestConfigDefaults

func RestConfigDefaults(cfg *rest.Config) *rest.Config

Types

type Controllers

type Controllers struct {
	RESTConfig *rest.Config
	K8s        kubernetes.Interface
	Core       corev1.Interface
	RBAC       rbacv1.Interface
	API        apiregistrationv1.Interface
	CRD        apiextensionsv1.Interface
	// contains filtered or unexported fields
}

func NewController

func NewController(cfg *rest.Config, opts *generic.FactoryOptions) (*Controllers, error)

func (*Controllers) Start

func (c *Controllers) Start(ctx context.Context) error

type Options

type Options struct {
	// Controllers If the controllers are passed in the caller must also start the controllers
	Controllers                *Controllers
	ClientFactory              *client.Factory
	AccessSetLookup            accesscontrol.AccessSetLookup
	AuthMiddleware             auth.Middleware
	Next                       http.Handler
	Router                     router.RouterFunc
	AggregationSecretNamespace string
	AggregationSecretName      string
	ClusterRegistry            string
	ServerVersion              string
}

type Server

type Server struct {
	http.Handler

	ClientFactory   *client.Factory
	ClusterCache    clustercache.ClusterCache
	SchemaFactory   schema.Factory
	RESTConfig      *rest.Config
	BaseSchemas     *types.APISchemas
	AccessSetLookup accesscontrol.AccessSetLookup
	APIServer       *apiserver.Server
	ClusterRegistry string
	Version         string
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, restConfig *rest.Config, opts *Options) (*Server, error)

func (*Server) ListenAndServe

func (c *Server) ListenAndServe(ctx context.Context, httpsPort, httpPort int, opts *server.ListenOpts) error

func (*Server) StartAggregation

func (c *Server) StartAggregation(ctx context.Context)

type StartHook

type StartHook func(context.Context, *Server) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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