1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-10 21:24:52 +08:00

TUN-5262: Allow to configure max fetch size for listing queries

This can be useful/important for accounts with many tunnels that exceed
the 1000 default page size.

There are various tunnel subcommands that use listing underneath, so we make
that flag a tunnel one, rather than adding it to each subcommand.
This commit is contained in:
Nuno Diegues
2021-10-18 10:32:33 +01:00
parent 3f4407ce27
commit eb51ff0a6d
4 changed files with 22 additions and 0 deletions

View File

@@ -277,6 +277,9 @@ func listCommand(c *cli.Context) error {
}
filter.ByTunnelID(tunnelID)
}
if maxFetch := c.Uint("max-fetch-size"); maxFetch > 0 {
filter.MaxFetchSize(maxFetch)
}
tunnels, err := sc.list(filter)
if err != nil {