-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
plumbing for the 'zrok test canary' commands (#771)
- Loading branch information
1 parent
3cf98fc
commit 5bee2bb
Showing
3 changed files
with
59 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/sirupsen/logrus" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func init() { | ||
testCanaryCmd.AddCommand(newTestCanaryPeriodicCommand().cmd) | ||
} | ||
|
||
type testCanaryPeriodicCommand struct { | ||
cmd *cobra.Command | ||
} | ||
|
||
func newTestCanaryPeriodicCommand() *testCanaryPeriodicCommand { | ||
cmd := &cobra.Command{ | ||
Use: "periodic", | ||
Short: "Run a periodic canary inspection", | ||
Args: cobra.NoArgs, | ||
} | ||
command := &testCanaryPeriodicCommand{cmd: cmd} | ||
cmd.Run = command.run | ||
return command | ||
} | ||
|
||
func (c *testCanaryPeriodicCommand) run(_ *cobra.Command, _ []string) { | ||
logrus.Info("periodic") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters