mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2025-09-16 23:32:29 +00:00
feat: refactor integration to use Failure object
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"github.com/fatih/color"
|
||||
"github.com/k8sgpt-ai/k8sgpt/pkg/ai"
|
||||
"github.com/k8sgpt-ai/k8sgpt/pkg/analyzer"
|
||||
"github.com/k8sgpt-ai/k8sgpt/pkg/common"
|
||||
"github.com/k8sgpt-ai/k8sgpt/pkg/kubernetes"
|
||||
"github.com/k8sgpt-ai/k8sgpt/pkg/util"
|
||||
"github.com/schollz/progressbar/v3"
|
||||
@@ -21,7 +22,7 @@ type Analysis struct {
|
||||
Filters []string
|
||||
Client *kubernetes.Client
|
||||
AIClient ai.IAI
|
||||
Results []analyzer.Result
|
||||
Results []common.Result
|
||||
Namespace string
|
||||
NoCache bool
|
||||
Explain bool
|
||||
@@ -35,9 +36,9 @@ const (
|
||||
)
|
||||
|
||||
type JsonOutput struct {
|
||||
Status AnalysisStatus `json:"status"`
|
||||
Problems int `json:"problems"`
|
||||
Results []analyzer.Result `json:"results"`
|
||||
Status AnalysisStatus `json:"status"`
|
||||
Problems int `json:"problems"`
|
||||
Results []common.Result `json:"results"`
|
||||
}
|
||||
|
||||
func (a *Analysis) RunAnalysis() error {
|
||||
@@ -46,7 +47,7 @@ func (a *Analysis) RunAnalysis() error {
|
||||
|
||||
analyzerMap := analyzer.GetAnalyzerMap()
|
||||
|
||||
analyzerConfig := analyzer.Analyzer{
|
||||
analyzerConfig := common.Analyzer{
|
||||
Client: a.Client,
|
||||
Context: a.Context,
|
||||
Namespace: a.Namespace,
|
||||
|
Reference in New Issue
Block a user