Module sync

Module sync 

Source
Expand description

Heroforge repository synchronization.

This module implements the Heroforge sync protocol for pushing and pulling artifacts between repositories over QUIC.

§Protocol Overview

Heroforge sync uses a simple line-oriented protocol:

  1. Client sends login credentials and push/pull cards
  2. Client sends igot cards for artifacts it has
  3. Client sends gimme cards for artifacts it wants
  4. Server responds with file cards containing requested artifacts
  5. Server sends igot cards for artifacts client doesn’t have

§Example (Builder API)

use heroforge_core::Repository;

let repo = Repository::open("local.forge")?;

// Sync over QUIC
repo.sync()
    .to("quic://example.com:4443/repo")
    .push()?;

Structs§

Message
A sync protocol message (request or response).
SyncBuilder
Builder for sync operations.
SyncClient
A sync client for communicating with a Heroforge server.
SyncResult
Result of a sync operation.

Enums§

Card
A card in the Heroforge sync protocol.
SyncProtocol
Protocol to use for sync.