add ilm management support (#43)

This commit is contained in:
T. von Dein
2026-06-22 13:52:02 +02:00
parent 802217158c
commit 9b5ba0775b
9 changed files with 700 additions and 1 deletions

View File

@@ -42,6 +42,7 @@ func Index(conf *cfg.Config) *cli.Command {
IndexAllocation(conf),
IndexModify(conf),
IndexFields(conf),
IndexIlm(conf),
// sub commands
IndexAlias(conf),
@@ -300,3 +301,24 @@ func IndexFields(conf *cfg.Config) *cli.Command {
},
}
}
func IndexIlm(conf *cfg.Config) *cli.Command {
return &cli.Command{
Name: "ilm",
Usage: "show ilm status",
UsageText: "index ilm <index>",
ShellComplete: func(ctx context.Context, cmd *cli.Command) {
complete(cmd, Cindex)
},
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)
},
}
}