Files
crawlab/backend/cmd/master.go
2021-04-29 10:44:46 +08:00

23 lines
416 B
Go

package cmd
import (
"crawlab/apps"
"github.com/spf13/cobra"
)
func init() {
rootCmd.AddCommand(masterCmd)
}
var masterCmd = &cobra.Command{
Use: "master",
Aliases: []string{"M"},
Short: "Start master",
Long: `Start a master instance of Crawlab
which runs api and assign tasks to worker nodes`,
Run: func(cmd *cobra.Command, args []string) {
master := apps.NewMaster()
apps.Start(master)
},
}