Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AgentCmd = &cobra.Command{
Use: "agent",
Short: "Run the agent server",
Run: runAgent,
}
View Source
var CacheCmd = &cobra.Command{
Use: "cache",
Short: "Run the cache server",
Run: runCache,
}
View Source
var ConsumerdCmd = &cobra.Command{
Use: "consumerd",
Short: "Run the consumerd server",
Run: runConsumerd,
}
View Source
var ControllerCmd = &cobra.Command{ Use: "controller", Short: "Run the Kubernetes operator (controller)", PreRun: func(cmd *cobra.Command, args []string) { utilruntime.Must(clientgoscheme.AddToScheme(scheme)) utilruntime.Must(v1alpha1.AddToScheme(scheme)) }, Run: runController, }
View Source
var MonitorCmd = &cobra.Command{
Use: "monitor",
Short: "Run the monitor server",
Run: runMonitor,
}
View Source
var RunCmd = &cobra.Command{ Use: "run component...", Short: "Run one or more kubecc components", ValidArgs: append(componentNames, "all"), Args: func(cmd *cobra.Command, args []string) error { if len(args) == 0 { return cobra.MinimumNArgs(1)(cmd, args) } for _, arg := range args { if _, ok := components[arg]; !ok { return fmt.Errorf("%w: %s", UnknownComponent, arg) } } return nil }, Example: `run agent # runs only the agent run monitor scheduler # runs both the monitor and scheduler run all # runs monitor, scheduler, agent, and consumerd`, SuggestFor: []string{"start"}, RunE: func(cmd *cobra.Command, args []string) error { set := mapset.NewSetFromSlice(func() []interface{} { argValues := make([]interface{}, len(args)) for i, arg := range args { argValues[i] = arg } return argValues }()) if set.Cardinality() < len(args) { fmt.Println("Warning: Duplicate components ignored") } for item := range set.Iter() { cmd := components[item.(string)] go cmd.Run(cmd, []string{}) } <-ctrl.SetupSignalHandler().Done() return nil }, }
View Source
var SchedulerCmd = &cobra.Command{
Use: "scheduler",
Short: "Run the scheduler server",
Run: runScheduler,
}
View Source
var (
UnknownComponent = errors.New("Unknown component")
)
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.