feature/node-usage (#88)

This commit is contained in:
T. von Dein
2026-07-10 13:37:59 +02:00
parent 5644046c78
commit 311a8474d6
4 changed files with 94 additions and 5 deletions

View File

@@ -36,6 +36,7 @@ func Node(conf *cfg.Config) *cli.Command {
NodeList(conf),
NodeShow(conf),
NodeClients(conf),
NodeUsage(conf),
},
}
}
@@ -103,3 +104,19 @@ func NodeClients(conf *cfg.Config) *cli.Command {
},
}
}
func NodeUsage(conf *cfg.Config) *cli.Command {
return &cli.Command{
Name: "usage",
Usage: "show node usage stats",
UsageText: "usage [options] [<node>]",
ShellComplete: func(ctx context.Context, cmd *cli.Command) {
complete(conf, cmd, Cnode)
},
Action: func(ctx context.Context, cmd *cli.Command) error {
return es.NodeUsage(conf, cmd.Args().Get(0))
},
}
}