mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 06:24:18 +02:00
feature add ilm-explain (#52)
This commit is contained in:
18
cmd/ilm.go
18
cmd/ilm.go
@@ -38,6 +38,7 @@ func Ilm(conf *cfg.Config) *cli.Command {
|
||||
IlmShow(conf),
|
||||
IlmCreate(conf),
|
||||
IlmForecast(conf),
|
||||
IlmExplain(conf),
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -54,6 +55,23 @@ func IlmRetry(conf *cfg.Config) *cli.Command {
|
||||
}
|
||||
}
|
||||
|
||||
func IlmExplain(conf *cfg.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "explain",
|
||||
Usage: "explain ilm condition of an index",
|
||||
UsageText: "explain <index>",
|
||||
|
||||
Action: func(ctx context.Context, cmd *cli.Command) error {
|
||||
index := cmd.Args().Get(0)
|
||||
if index == "" {
|
||||
return errors.New("no index specified")
|
||||
}
|
||||
|
||||
return es.IlmExplain(conf, index)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func IlmStatus(conf *cfg.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "status",
|
||||
|
||||
Reference in New Issue
Block a user