-
-
Notifications
You must be signed in to change notification settings - Fork 756
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
probe command, probe refactoring, urfave update
Signed-off-by: Kyle Quest <[email protected]>
- Loading branch information
Showing
80 changed files
with
7,741 additions
and
1,523 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
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
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
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
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,40 @@ | ||
package probe | ||
|
||
import ( | ||
log "github.com/sirupsen/logrus" | ||
"github.com/urfave/cli/v2" | ||
) | ||
|
||
// Probe command flag names and usage descriptions | ||
const ( | ||
FlagTarget = "target" | ||
FlagTargetUsage = "Target endpoint to probe" | ||
|
||
//for now just TCP ports (so no FlagProto for now) | ||
FlagPort = "port" | ||
FlagPortUsage = "Endpoint port to probe" | ||
) | ||
|
||
var Flags = map[string]cli.Flag{ | ||
FlagTarget: &cli.StringFlag{ | ||
Name: FlagTarget, | ||
Value: "", | ||
Usage: FlagTargetUsage, | ||
EnvVars: []string{"DSLIM_PRB_TARGET"}, | ||
}, | ||
FlagPort: &cli.UintSliceFlag{ | ||
Name: FlagPort, | ||
Value: cli.NewUintSlice(), | ||
Usage: FlagPortUsage, | ||
EnvVars: []string{"DSLIM_PRB_PORT"}, | ||
}, | ||
} | ||
|
||
func cflag(name string) cli.Flag { | ||
cf, ok := Flags[name] | ||
if !ok { | ||
log.Fatalf("unknown flag='%s'", name) | ||
} | ||
|
||
return cf | ||
} |
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
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 |
---|---|---|
|
@@ -9,5 +9,5 @@ func RegisterCommand() { | |
Name, | ||
CLI, | ||
CommandSuggestion, | ||
nil) | ||
CommandFlagSuggestions) | ||
} |
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
Oops, something went wrong.