Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(logging/logadmin): allow logging PageSize to override #9409

Merged
merged 10 commits into from
Mar 6, 2024
7 changes: 7 additions & 0 deletions logging/logadmin/logadmin.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,13 @@ type newestFirst struct{}

func (newestFirst) set(r *logpb.ListLogEntriesRequest) { r.OrderBy = "timestamp desc" }

// PageSize provide a way to override number of results to return from each request. Default is 50
func PageSize(p int32) EntriesOption { return pageSize(p) }

type pageSize int32

func (p pageSize) set(r *logpb.ListLogEntriesRequest) { r.PageSize = int32(p) }

// Entries returns an EntryIterator for iterating over log entries. By default,
// the log entries will be restricted to those from the project passed to
// NewClient. This may be overridden by passing a ProjectIDs option. Requires ReadScope or AdminScope.
Expand Down