Documentation
¶
Index ¶
- Constants
- Variables
- func DcpRun(ctx context.Context, cwd string, kconfig *kubeconfig.Kubeconfig, ...) error
- func NewDcpExtensionService(appRootDir string, ext DcpExtension, command string, invocationFlags []string, ...) (*hosting.CommandService, error)
- type DcpExtension
- type DcpRunEventHandlers
- type FilePermission
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 (*DcpExtension) CanRender ¶
func (ext *DcpExtension) CanRender(ctx context.Context, appRootDir string, log logr.Logger) (extensions.CanRenderResponse, error)
type DcpRunEventHandlers ¶
type DcpRunEventHandlers struct {
AfterApiSrvStart func() error
BeforeApiSrvShutdown func(apiserver.ApiServerResourceCleanup) error
}
type FilePermission ¶
type FilePermission uint32
Click to show internal directories.
Click to hide internal directories.