QueryEntryPolicy

class QueryEntryPolicy @InternalWowApi constructor(val requireExplicitEntry: Boolean = false, val requireAuthenticatedScope: Boolean = false, val http: QueryBudget = QueryBudget.HTTP_DEFAULT, val inProcess: QueryBudget? = null, val inProcessTimeout: Duration? = QueryBudget.DEFAULT_TIMEOUT)

What a gateway requires of a query's QueryEntry before admitting it, and the budget each entry runs under.

Constructors

Link copied to clipboard
constructor(requireExplicitEntry: Boolean = false, requireAuthenticatedScope: Boolean = false, http: QueryBudget = QueryBudget.HTTP_DEFAULT, inProcess: QueryBudget? = null, inProcessTimeout: Duration? = QueryBudget.DEFAULT_TIMEOUT)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

the budget of QueryEntry.HTTP queries.

Link copied to clipboard

the budget of QueryEntry.IN_PROCESS and QueryEntry.UNSPECIFIED queries; null, the default, checks nothing. A host gives it QueryBudget.IN_PROCESS_DEFAULT by default (wow.query.budgets.in-process.*), so in-process code is bounded as a request is.

Link copied to clipboard

the execution timeout of a query whose entry has no budget (QueryEntry.UNBOUNDED, or every in-process query when inProcess is null: every query has one); null runs such a query without one.

Link copied to clipboard

rejects an QueryEntry.HTTP query on a built-in model whose QueryScope.authenticated does not pin the model's required scope. A declared scope (a tenant header, say) still filters the query but never satisfies this check. Off by default: the declared scope is trusted.

Link copied to clipboard

rejects QueryEntry.UNSPECIFIED queries, so every caller must say whether it is HTTP or in-process. Off by default: an unspecified entry is treated as in-process, which keeps existing QueryGateway callers working unchanged.

Functions

Link copied to clipboard

The entry the query runs under, after this policy accepted it.

Link copied to clipboard
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard

The execution timeout of entry's queries: its budget's, or inProcessTimeout for an entry without one.

Link copied to clipboard
open override fun toString(): String