standalone

package
v11.1.4-modfix Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServerFactory

type APIServerFactory interface {
	// Called before the groups are loaded so any custom command can be registered
	GetOptions() options.OptionsProvider

	// Given the flags, what can we produce
	GetEnabled(runtime []RuntimeConfig) ([]schema.GroupVersion, error)

	// Make an API server for a given group+version
	MakeAPIServer(ctx context.Context, tracer tracing.Tracer, gv schema.GroupVersion) (builder.APIGroupBuilder, error)

	Shutdown()
}

func GetDummyAPIFactory

func GetDummyAPIFactory() APIServerFactory

Zero dependency provider for testing

type DummyAPIFactory

type DummyAPIFactory struct{}

func (*DummyAPIFactory) ApplyTo

func (*DummyAPIFactory) GetEnabled

func (p *DummyAPIFactory) GetEnabled(runtime []RuntimeConfig) ([]schema.GroupVersion, error)

func (*DummyAPIFactory) GetOptions

func (p *DummyAPIFactory) GetOptions() options.OptionsProvider

func (*DummyAPIFactory) MakeAPIServer

func (*DummyAPIFactory) Shutdown

func (p *DummyAPIFactory) Shutdown()

type RuntimeConfig

type RuntimeConfig struct {
	Group   string
	Version string
	Enabled bool
}

func ReadRuntimeConfig

func ReadRuntimeConfig(cfg string) ([]RuntimeConfig, error)

Supported options are:

<group>/<version>=true|false for a specific API group and version (e.g. dashboards.grafana.app/v0alpha1=true)
api/all=true|false controls all API versions
api/ga=true|false controls all API versions of the form v[0-9]+
api/beta=true|false controls all API versions of the form v[0-9]+beta[0-9]+
api/alpha=true|false controls all API versions of the form v[0-9]+alpha[0-9]+`)

See: https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/

func (RuntimeConfig) String

func (a RuntimeConfig) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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