Documentation
¶
Index ¶
- Constants
- func NewAdminHttpHandler(lifetimeCtx context.Context, runConfig ApiServerRunConfig, log logr.Logger) http.Handler
- func RequestApiServerShutdown(ctx context.Context, restClient *clientgorest.RESTClient) error
- type ApiServer
- type ApiServerExecutionData
- type ApiServerExecutionStatus
- type ApiServerResourceCleanup
- type ApiServerRunConfig
Constants ¶
View Source
const ( AdminPathPrefix = "/admin/" ExecutionDocument = "execution" PerfTraceDocument = "perftrace" )
View Source
const (
DCP_RESOURCE_WATCH_TIMEOUT_SECONDS = "DCP_RESOURCE_WATCH_TIMEOUT_SECONDS"
)
Variables ¶
This section is empty.
Functions ¶
func NewAdminHttpHandler ¶
func RequestApiServerShutdown ¶
func RequestApiServerShutdown(ctx context.Context, restClient *clientgorest.RESTClient) error
Types ¶
type ApiServer ¶
type ApiServer struct {
// contains filtered or unexported fields
}
func NewApiServer ¶
func NewApiServer(name string, config *kubeconfig.Kubeconfig, logger logr.Logger) *ApiServer
type ApiServerExecutionData ¶
type ApiServerExecutionData struct {
Status ApiServerExecutionStatus `json:"status"`
ShutdownResourceCleanup ApiServerResourceCleanup `json:"shutdownResourceCleanup,omitempty"`
}
type ApiServerExecutionStatus ¶
type ApiServerExecutionStatus string
const ( ApiServerRunning ApiServerExecutionStatus = "Running" ApiServerCleaningResources ApiServerExecutionStatus = "CleaningResources" ApiServerStopping ApiServerExecutionStatus = "Stopping" ApiServerCleanupComplete ApiServerExecutionStatus = "CleanupComplete" )
type ApiServerResourceCleanup ¶
type ApiServerResourceCleanup string
const ( // Do not perform any cleanup. ApiServerResourceCleanupNone ApiServerResourceCleanup = "None" // Perform full resource cleanup (default). ApiServerResourceCleanupFull ApiServerResourceCleanup = "Full" )
func (ApiServerResourceCleanup) IsFull ¶
func (rc ApiServerResourceCleanup) IsFull() bool
type ApiServerRunConfig ¶
type ApiServerRunConfig struct {
// RequestShutdown() is a function that can be called to indicate that the API server should shut down.
// It should NOT be assumed that this is identical to the cancellation function for the API server run context.
// The API server will be shut down by cancelling the run context, but that in general
// happens asynchronously to the call to RequestShutdown().
// Mandatory, must not be nil.
RequestShutdown func(ApiServerResourceCleanup)
// The NotificationSource for sending notifications to clients of the API server (such as the controllers process).
// NotificationSource is optional.
NotificationSource notifications.NotificationSource
// CollectPerfTrace is a function that can be called to collect performance trace data.
// The duration of the trace is controlled by the passed (cancellable) context.
// CollectPerfTrace is optional.
CollectPerfTrace func(context.Context, context.CancelFunc, logr.Logger) error
}
Provides additional dependencies that the API server may need during its execution.
Click to show internal directories.
Click to hide internal directories.