File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010@dataclass
1111class UpdaterConfig :
12+ """Used to store Updater configuration.
13+
14+ Arguments:
15+ max_root_rotations: The maximum number of root rotations.
16+ max_delegations: The maximum number of delegations.
17+ root_max_length: The maxmimum length of a root metadata file.
18+ timestamp_max_length: The maximum length of a timestamp metadata file.
19+ snapshot_max_length: The maximum length of a snapshot metadata file.
20+ targets_max_length: The maximum length of a targets metadata file.
21+ prefix_targets_with_hash: When consistent snapshots are used
22+ (see https://theupdateframework.github.io/specification/latest/#consistent-snapshots), #pylint: disable=line-too-long
23+ target download URLs are formed by prefixing the filename with a
24+ hash digest of file content by default. This can be overridden by
25+ setting prefix_targets_with_hash to False.
26+
27+ """
28+
1229 max_root_rotations : int = 32
1330 max_delegations : int = 32
1431 root_max_length : int = 512000 # bytes
1532 timestamp_max_length : int = 16384 # bytes
1633 snapshot_max_length : int = 2000000 # bytes
1734 targets_max_length : int = 5000000 # bytes
18- # We need this variable because there are use cases like Warehouse where
19- # you could use consistent_snapshot, but without adding a hash prefix.
20- # By default, prefix_targets_with_hash is set to true to use uniquely
21- # identifiable targets file names for repositories.
2235 prefix_targets_with_hash : bool = True
You can’t perform that action at this time.
0 commit comments