Documentation
¶
Overview ¶
Package connpolicy holds unexported construction helpers for GON-065 admitted-N formulas used when sizing HTTP connection pools. It is internal: not a Stable library surface. Helpers refuse overflow rather than wrapping to a smaller positive MaxConns under a parallel(N) claim.
Arithmetic is intentionally limited to the positive admitted-N domain used by locked composite formulas (transfer C/L, content workers ≥ 1). It is not a general signed-integer arithmetic library.
Index ¶
- func AddChecked(a, b int) (int, error)
- func ContentWorkerPlusEnumerator(workers int, enumeratorConcurrent bool) (int, error)
- func MulChecked(a, b int) (int, error)
- func TransferDestAdmittedN(concurrency int) (int, error)
- func TransferSourceAdmittedN(concurrency, listConcurrency int, shardingEnabled bool) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddChecked ¶
AddChecked returns a+b for positive admitted-N components, or an error if either operand is not ≥ 1 or the sum overflows int.
func ContentWorkerPlusEnumerator ¶
ContentWorkerPlusEnumerator returns workers, or workers+1 when a prefix/glob enumerator may LIST on the same client while workers run.
func MulChecked ¶
MulChecked returns a*b for positive admitted-N components, or an error if either operand is not ≥ 1 or the product overflows int.
func TransferDestAdmittedN ¶
TransferDestAdmittedN is the destination-client ceiling (transfer workers only).
func TransferSourceAdmittedN ¶
TransferSourceAdmittedN is the as-built shared-source ceiling for non-reflow transfer: list workers (L) plus transfer workers (C), and an additional L when sharded discovery can overlap regular listing.
Callers must resolve defaults so C and L are positive before calling.
Types ¶
This section is empty.