bootstrap

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserRead fs.FileMode = 1 << (8 - iota)
	UserWrite
	UserExecute
	GroupRead
	GroupWrite
	GroupExecute
	OtherRead
	OtherWrite
	OtherExecute
)

Variables

View Source
var (
	// File basename -> extension
	WellKnownExtensions = map[string]DcpExtension{
		"dcpctrl": {
			Name:         "DCP controller host",
			Id:           "dcpctrl",
			Capabilities: []extensions.ExtensionCapability{extensions.ControllerCapability, extensions.ProcessMonitorCapability},
		},
	}
)

Functions

func DcpRun

func DcpRun(
	ctx context.Context,
	cwd string,
	kconfig *kubeconfig.Kubeconfig,
	serverOnly bool,
	allExtensions []DcpExtension,
	invocationFlags []string,
	log logr.Logger,
) error

DcpRun() starts the API server and controllers and waits for the signal to terminate them. It serves as a "skeleton" for commands such as "up" and "start-apiserver". Additional logic can be added into the API server lifecycle via evtHandlers parameter.

func NewDcpExtensionService

func NewDcpExtensionService(appRootDir string, ext DcpExtension, command string, invocationFlags []string, log logr.Logger) (*hosting.CommandService, error)

Types

type DcpExtension

type DcpExtension struct {
	Name         string
	Id           string
	Path         string
	Capabilities []extensions.ExtensionCapability
}

func GetExtensions

func GetExtensions(ctx context.Context, log logr.Logger) ([]DcpExtension, error)

func (*DcpExtension) CanRender

func (ext *DcpExtension) CanRender(ctx context.Context, appRootDir string, log logr.Logger) (extensions.CanRenderResponse, error)

func (*DcpExtension) Render

func (ext *DcpExtension) Render(ctx context.Context, appRootDir string, kubeconfigPath string, log logr.Logger) error

type DcpRunEventHandlers

type DcpRunEventHandlers struct {
	AfterApiSrvStart     func() error
	BeforeApiSrvShutdown func(apiserver.ApiServerResourceCleanup) error
}

type FilePermission

type FilePermission uint32

Jump to

Keyboard shortcuts

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