mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-29 00:39:58 +00: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:
@@ -2,6 +2,7 @@ package tunnelstore
|
||||
|
||||
import (
|
||||
"net/url"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
@@ -45,6 +46,10 @@ func (f *Filter) ByTunnelID(tunnelID uuid.UUID) {
|
||||
f.queryParams.Set("uuid", tunnelID.String())
|
||||
}
|
||||
|
||||
func (f *Filter) MaxFetchSize(max uint) {
|
||||
f.queryParams.Set("per_page", strconv.Itoa(int(max)))
|
||||
}
|
||||
|
||||
func (f Filter) encode() string {
|
||||
return f.queryParams.Encode()
|
||||
}
|
||||
|
Reference in New Issue
Block a user