Paginate targets in cache (#5101)

* Update Go API to support pagination
* Implement pagination of targets in cache

(cherry picked from commit cd25fad42f325fc050b7ea3bec3336780d2b5e16)
This commit is contained in:
Jeff Mitchell authored and Timothy Messier committed 2024-09-24 14:18:53 +00:00
1 parent 2a87dcad48
commit 3a4ee032d9
62 files changed
+3875 -1533

No files matched your search

+9
View File
@@ -50,6 +50,7 @@ type StartCommand struct {
flagLogFormat string
flagStoreDebug bool
flagBackground bool
flagForceResetSchema bool
}
func (c *StartCommand) Synopsis() string {
@@ -133,6 +134,13 @@ func (c *StartCommand) Flags() *base.FlagSets {
Default: false,
Usage: `Run the cache daemon in the background`,
})
f.BoolVar(&base.BoolVar{
Name: "force-reset-schema",
Target: &c.flagForceResetSchema,
Default: false,
Usage: `Force resetting the cache schema and all contained data`,
Hidden: true,
})
return set
}
@@ -207,6 +215,7 @@ func (c *StartCommand) Run(args []string) int {
LogFileName: logFileName,
DotDirectory: dotDir,
RunningInBackground: os.Getenv(backgroundEnvName) == backgroundEnvVal,
ForceResetSchema: c.flagForceResetSchema,
}
srv, err := daemon.New(ctx, cfg)