mirror of
https://github.com/tailscale/tailscale.git
synced 2026-04-03 14:13:12 -04:00
This makes the limits easier to find and change, rather than scattering them across the TKA code. Updates #cleanup Change-Id: I2f9b3b83d293eebb2572fa7bb6de2ca1f3d9a192 Signed-off-by: Alex Chan <alexc@tailscale.com>
25 lines
728 B
Go
25 lines
728 B
Go
// Copyright (c) Tailscale Inc & contributors
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
package tka
|
|
|
|
const (
|
|
// Upper bound on checkpoint elements, chosen arbitrarily. Intended
|
|
// to cap the size of large AUMs.
|
|
maxDisablementSecrets = 32
|
|
maxKeys = 512
|
|
|
|
// Max amount of metadata that can be associated with a key, chosen arbitrarily.
|
|
// Intended to avoid people abusing TKA as a key-value score.
|
|
maxMetaBytes = 512
|
|
|
|
// Max iterations searching for any intersection during the sync process.
|
|
maxSyncIter = 2000
|
|
|
|
// Max iterations searching for a head intersection during the sync process.
|
|
maxSyncHeadIntersectionIter = 400
|
|
|
|
// Limit on scanning AUM trees, chosen arbitrarily.
|
|
maxScanIterations = 2000
|
|
)
|