Skip to content

Distribution

The bridge connects registries to the distribution network of the storage stack. It reads registries like any reader, and publishes manifests, commands and deletions that Dragonfly bridges act on.

How it works

Every SYNC_SECONDS, the bridge

  1. reads each configured registry with a quorum of indexers,
  2. drops assets that expired or belong to another region,
  3. publishes a distribution manifest (kind 5101) when an asset is new or changed,
  4. publishes a command (kind 5102) when the intent changed,
  5. publishes a deletion (kind 5103), or a stop command if the policy is retain, when an asset is gone.

It remembers the newest version of each registry. A conflicting or older state is refused, and the last good state stays in effect.

Running it

The storage stack and the registry network must be running.

REGISTRIES=<author>/demo/files src/support/registries/deploy/scripts/bridge.sh

The script starts the storage signer and the bridge, adds the bridge's storage key to the trusted authors, and restarts the storage bridge.

Variable Default Meaning
REGISTRIES none Comma-separated author/name list
WATCHDOGS none Trusted watchdogs
QUORUM 2 Indexers to consult
MIN_TRUST_PERCENT 40 Minimum score of an indexer
REGION local Region of this bridge
SYNC_SECONDS 15 Interval
SIGNER_URL, SIGNER_TOKEN, SIGNER_KEY required, required, registry-bridge Storage signer and key
STORAGE_RELAYS none Relays of the storage stack
ALLOW_PRIVATE false Allow private addresses

GET /v1/info shows the storage key and the registries.