enhance/clusterstatus (#44)

fixes #35
This commit is contained in:
T. von Dein
2026-06-22 14:11:32 +02:00
parent 9b5ba0775b
commit a81d6b94e9
2 changed files with 73 additions and 12 deletions

View File

@@ -390,6 +390,26 @@ func getClusterData(es *elasticsearch.TypedClient, wg *sync.WaitGroup, reschan c
ar.stats = res
ar.which = ResponseStats
arerr = err
case "indices":
res, err := es.Cat.Indices().
Header("content-type", "application/json").
Header("accept", "application/json").
Do(context.Background())
ar.indices = &res
ar.which = ResponseIndices
arerr = err
case "tasks":
res, err := es.Cat.Tasks().
Header("content-type", "application/json").
Header("accept", "application/json").
Do(context.Background())
ar.tasks = &res
ar.which = ResponseTasks
arerr = err
}
if arerr != nil {