-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [sc-106625] http analyzer for in-cluster (#1566)
* http analzyer for in-cluster * make check-schemas
- Loading branch information
Showing
11 changed files
with
450 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package analyzer | ||
|
||
import ( | ||
troubleshootv1beta2 "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2" | ||
) | ||
|
||
type AnalyzeHTTPAnalyze struct { | ||
analyzer *troubleshootv1beta2.HTTPAnalyze | ||
} | ||
|
||
func (a *AnalyzeHTTPAnalyze) Title() string { | ||
checkName := a.analyzer.CheckName | ||
if checkName == "" { | ||
checkName = a.analyzer.CollectorName | ||
} | ||
|
||
return checkName | ||
} | ||
|
||
func (a *AnalyzeHTTPAnalyze) IsExcluded() (bool, error) { | ||
return isExcluded(a.analyzer.Exclude) | ||
} | ||
|
||
func (a *AnalyzeHTTPAnalyze) Analyze(getFile getCollectedFileContents, findFiles getChildCollectedFileContents) ([]*AnalyzeResult, error) { | ||
fileName := "result.json" | ||
if a.analyzer.CollectorName != "" { | ||
fileName = a.analyzer.CollectorName + ".json" | ||
} | ||
return analyzeHTTPResult(a.analyzer, fileName, getFile, a.Title()) | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.