...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package main
17
18 import (
19 "fmt"
20 "os"
21
22 "github.com/spf13/cobra"
23
24 "github.com/chaos-mesh/chaos-mesh/pkg/chaosdaemon/helper"
25 )
26
27 var rootCmd = &cobra.Command{
28 Use: "cdh [command]",
29 Short: "cdh is a helper to run some logic in another namespaces/cgroups",
30 Long: `chaos-daemon sometimes needs to run some logic inside another namespace/cgroup.
31 We can write these logic inside this helper, and execute them through nsexec.`,
32 }
33
34 func main() {
35 rootCmd.AddCommand(helper.NormalizeVolumeNameCmd)
36 if err := rootCmd.Execute(); err != nil {
37 fmt.Fprintln(os.Stderr, err)
38 os.Exit(1)
39 }
40 }
41