apiserverbuilder

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Scheme defines methods for serializing and deserializing API objects.
	Scheme = runtime.NewScheme()
	// Codecs provides methods for retrieving codecs and serializers for specific
	// versions and content types.
	Codecs = serializer.NewCodecFactory(Scheme)

	ParameterScheme = runtime.NewScheme()
	ParameterCodec  = runtime.NewParameterCodec(ParameterScheme)

	APIs                = map[schema.GroupVersionResource]StorageProvider{}
	GenericAPIServerFns []func(*server.GenericAPIServer) *server.GenericAPIServer
)
View Source
var (
	EtcdPath             string
	RecommendedConfigFns []func(*server.RecommendedConfig) *server.RecommendedConfig
	ServerOptionsFns     []func(server *ServerOptions) *ServerOptions
	FlagsFns             []func(fs *pflag.FlagSet) *pflag.FlagSet
)

Functions

func ApplyFlagsFns

func ApplyFlagsFns(fs *pflag.FlagSet) *pflag.FlagSet

func ApplyGenericAPIServerFns

func ApplyGenericAPIServerFns(in *server.GenericAPIServer) *server.GenericAPIServer

func ApplyRecommendedConfigFns

func ApplyRecommendedConfigFns(in *server.RecommendedConfig) *server.RecommendedConfig

func NewCommandStartServer

func NewCommandStartServer(ctx context.Context, serverName string, defaults *ServerOptions) *cobra.Command

NewCommandStartServer provides a CLI handler for 'start master' command with a default ServerOptions.

Types

type CompletedConfig

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

CompletedConfig embeds a private pointer that cannot be instantiated outside of this package.

func (CompletedConfig) New

func (c CompletedConfig) New(ctx context.Context) (*Server, error)

New returns a new instance of Server from the given config.

type Config

type Config struct {
	GenericConfig *server.RecommendedConfig
	ExtraConfig   ExtraConfig
}

func (*Config) Complete

func (cfg *Config) Complete() CompletedConfig

Complete fills in any fields not set that are required to have valid data. It's mutating the receiver.

type ExtraConfig

type ExtraConfig struct {
	ServerName string
}

ExtraConfig holds custom apiserver config

type Server

type Server struct {
	GenericAPIServer *server.GenericAPIServer
}

Server contains state for a Kubernetes cluster master/api server.

type ServerOptions

type ServerOptions struct {
	RecommendedOptions *genericoptions.RecommendedOptions

	StdOut io.Writer
	StdErr io.Writer
}

func ApplyServerOptionsFns

func ApplyServerOptionsFns(in *ServerOptions) *ServerOptions

func NewServerOptions

func NewServerOptions(out, errOut io.Writer, versions ...schema.GroupVersion) *ServerOptions

NewServerOptions returns a new ServerOptions

func (*ServerOptions) Complete

func (o *ServerOptions) Complete() error

Complete fills in fields required to have valid data

func (*ServerOptions) Config

func (o *ServerOptions) Config(serverName string) (*Config, error)

Config returns config for the api server given WardleServerOptions

func (ServerOptions) RunServer

func (o ServerOptions) RunServer(ctx context.Context, serverName string) error

RunServer starts a new Server given ServerOptions

func (ServerOptions) Validate

func (o ServerOptions) Validate(args []string) error

Validate validates ServerOptions

Jump to

Keyboard shortcuts

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