Documentation
¶
Overview ¶
Package limitsinfo is the limits block platform_info reports (#2057): the ceilings this deployment puts on what a call returns or writes, with the configuration key that sets each where one does, so an agent reads them rather than finding them by hitting them. Each part is reported only to a caller whose persona can reach a tool it bounds.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Export ¶
type Export struct {
MaxRows int `json:"max_rows,omitempty"`
MaxRowsKey string `json:"max_rows_key,omitempty"`
MaxBytes int64 `json:"max_bytes"`
MaxBytesKey string `json:"max_bytes_key"`
DefaultTimeoutSeconds int `json:"default_timeout_seconds"`
MaxTimeoutSeconds int `json:"max_timeout_seconds"`
MaxTimeoutKey string `json:"max_timeout_key"`
}
Export bounds trino_export, api_export and graphql_export. MaxRows is trino_export's: a row export cut at it fails unless on_truncation is "warn". MaxBytes is every export's, and a result over it is refused whole.
type Limits ¶
type Limits struct {
Export *Export `json:"export,omitempty"`
Query *Query `json:"query,omitempty"`
PageWalk *PageWalk `json:"page_walk,omitempty"`
}
Limits is the block. A part is absent when the caller reaches no tool it bounds.
func Build ¶
func Build(accessibleTools []string, export Export, query *Query, apiWalk, graphqlWalk WalkBounds) *Limits
Build assembles the block for a caller reaching accessibleTools, from the configured values: export without its keys, query nil when no Trino toolkit is registered, and each page-walk family's bounds. It is nil when the caller reaches no tool any part bounds.
type PageWalk ¶
type PageWalk struct {
API *WalkBounds `json:"api,omitempty"`
GraphQL *WalkBounds `json:"graphql,omitempty"`
}
PageWalk is the page bounds of a paginate walk, per tool family.
type Query ¶
type Query struct {
DefaultRows int `json:"default_rows"`
MaxRows int `json:"max_rows"`
TimeoutSeconds int `json:"timeout_seconds"`
}
Query bounds trino_query: the rows a result holds when the call names no limit, the most it may name, and the query timeout. A result past the limit is returned cut and says so in stats.truncated.
type WalkBounds ¶
type WalkBounds struct {
DefaultMaxPages int `json:"default_max_pages"`
MaxPages int `json:"max_pages"`
}
WalkBounds is one family's page bounds: the bound a walk runs under when paginate.max_pages is unset, and the most max_pages may be. An export walk stopped at the default bound fails unless on_truncation is "warn".