Skip to main content

Module config

Module config 

Source

Structs§

ObjectOpts

Enums§

OperatorRuleContract
How the sites of a cluster treat the operator rules of a replication config merge. Every site must apply the same contract to the same payload or the sites persist different configs, so the S3 edit path probes the peers before merging and a peer payload carries the contract its sender applied.
ReplicationConfigStructureError
A structural defect in a replication configuration, detected before the configuration is persisted.
ReplicationTargetValidationError

Constants§

REMOTE_TARGET_CAPABILITY_CONTRACT_VERSION
REMOTE_TARGET_READ_ONLY_HISTORICAL_FIELDS
Remote target fields that are readable for persisted-data compatibility but cannot be written through the admin API.
REMOTE_TARGET_UNSUPPORTED_FIELDS
REMOTE_TARGET_WRITABLE_FIELDS
REPLICATION_CAPABILITY_CONTRACT_VERSION
REPLICATION_CONFIG_MAX_RULES
Maximum number of rules accepted in one replication configuration, matching MinIO’s replication.Config.Validate limit.
REPLICATION_CONFIG_MAX_RULE_ID_LEN
Maximum length of a replication rule ID, matching the S3 schema.
REPLICATION_READ_ONLY_HISTORICAL_FIELDS
REPLICATION_WRITABLE_FIELDS
SITE_REPLICATION_RULE_ID_PREFIX
Rule id prefix the site-replication reconciler stamps on the rules it derives (site-repl-<peer deployment id>).

Traits§

ReplicationConfigurationExt

Functions§

active_replication_rule_destination_arns
assign_site_replication_rule_priorities
Give the site rules in rules the lowest priorities no operator rule uses, in rule order, leaving every operator rule’s priority untouched. Operator priorities decide which rule wins per target, so they are part of the submitted policy; site rules are derived state and only need to be unique (validate_replication_config_structure rejects duplicates). The result is a pure function of the rule list, so the site-replication reconciler, the peer ingestion merge and the S3 edit merge all converge on the same bytes and the reconciler’s no-op check holds.
invalid_replication_config_status_field
is_reconciler_owned_site_replication_rule
Whether rule is one the local reconciler derived for a current remote site-replication peer in peer_deployment_ids. With an empty peer set (site replication disabled) nothing qualifies, so a bucket outside site replication keeps the verbatim S3 put/delete semantics.
is_site_replication_role
Whether a config’s Role is a site-replication ARN naming a site in deployment_ids. Such a role is the holder’s identity, not policy: the reconciler’s per-peer target lookup reads it, so carrying it across sites would pin the receiver’s targets to the sender’s. Any other role — an IAM role, or an operator remote target whose ARN happens to carry an empty region — passed target validation and drives target selection.
is_site_replication_rule
Whether rule carries a site-replication rule id (site-repl-*). Rule ids are not reserved, so this is only the classification of OperatorRuleContract::Legacy; every other path classifies by site_replication_rule_deployment_id.
merge_incoming_replication_config
Merge a peer’s replication config into the local one.
merge_user_replication_config
merge_incoming_replication_config for the S3 put/delete-bucket-replication path (issue #1948): only rules the local reconciler derived for a current peer in peer_deployment_ids survive as site rules; every other stored rule — including an operator-authored site-repl-* id — is operator state that the request replaces or deletes. An incoming rule whose id is a current peer’s site-repl-<id> is dropped whatever its ARN: accepting it would duplicate the reconciler rule’s id. Under OperatorRuleContract::Legacy the merge instead reproduces what the pre-contract peers will do with the broadcast, listing the operator rules in priority order so their relative order survives the renumbering.
replication_target_arn_deployment_id
Deployment id extracted from a site-replication target ARN (arn:{rustfs|minio}:replication::<deployment-id>:<bucket>), or None for an operator-authored ARN.
replication_target_arns
should_remove_replication_target
site_replication_rule_deployment_id
Deployment id of the peer a reconciler-derived rule replicates to, or None for any other rule. The reconciler builds each rule from one peer: the id is site-repl-<deployment id> and the destination ARN names that same deployment id — an operator-authored site-repl-user rule, or a site-repl-<peer> id pasted onto a foreign ARN, fails the agreement check. Callers that know the current peer set must also confirm the id is one of those peers before treating the rule as reconciler-owned.
unsupported_replication_config_field
validate_replication_config_structure
Structural validation of a replication configuration, mirroring the checks MinIO’s replication.Config.Validate performs before persisting: at least one rule, at most REPLICATION_CONFIG_MAX_RULES, non-negative and unique per-rule priorities (a missing Priority counts as 0, like Go’s zero value), rule IDs within REPLICATION_CONFIG_MAX_RULE_ID_LEN bytes, a Filter carrying only one of Prefix/Tag/And, and delete marker replication disabled on rules with a direct Filter.Tag. Tags inside Filter.And do NOT trigger the delete-marker check — MinIO only inspects the direct tag, and mc replicate add --tags "k1=v1&k2=v2" (delete-marker replication on by default) puts multiple tags into And.Tags, so rejecting that shape would break mc-generated configs that MinIO accepts.
validate_replication_config_target_arns