mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 11:24:17 +02:00
add support for config file and multiple clusters config (#1)
This commit is contained in:
@@ -26,7 +26,7 @@ import (
|
||||
)
|
||||
|
||||
func IndexList(conf *cfg.Config) error {
|
||||
cat := conf.ES.Cat.Indices()
|
||||
cat := conf.DefaultCluster.ES.Cat.Indices()
|
||||
|
||||
if conf.Failed {
|
||||
cat = cat.Health(healthstatus.Red)
|
||||
@@ -67,7 +67,7 @@ func IndexList(conf *cfg.Config) error {
|
||||
}
|
||||
|
||||
func IndexShow(conf *cfg.Config, index string) error {
|
||||
res, err := conf.ES.Indices.Get(index).Do(context.Background())
|
||||
res, err := conf.DefaultCluster.ES.Indices.Get(index).Do(context.Background())
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get index: %s", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user