Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "victorops-notifier", Short: "Listen to alerts and notify you", Run: func(cmd *cobra.Command, args []string) { var cli = victorops.New("", apiID, apiKey) incidents, err := cli.Incidents() if err != nil { fmt.Println(err) os.Exit(1) } var g errgroup.Group for _, incident := range incidents { if incident.CurrentPhase == "UNACKED" { incident := incident g.Go(func() error { return notify(incident) }) } } if err := g.Wait(); err != nil { fmt.Println(err) os.Exit(1) } }, }
RootCmd represents the base command when called without any subcommands
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.