server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 33 Imported by: 10 modules, 65 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

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