Jason Tudisco 23e5e0712e Add sync agent to go_example_1.ps1 for automatic P2P replication
The go script now builds and starts the can-sync agent alongside CAN
service and Paste UI. Any machine that clones the repo and runs the
script will auto-discover other instances via iroh's relay network
using the shared passphrase "duke-canman-sync" — no port forwarding
or manual peer configuration needed.

Changes:
- Add sync_api_key to root config.yaml (enables sync API)
- Update can-sync config.yaml with matching key and shared passphrase
- Update go_example_1.ps1 to build and launch can-sync agent
- Script now manages 3 processes: CAN service, Paste UI, sync agent

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 17:16:42 -06:00

21 lines
816 B
YAML

# CAN Sync v2 configuration
#
# This config is used by the go_example_1.ps1 script.
# All machines that clone this repo and run the script will
# auto-discover each other via iroh's relay network as long
# as they share the same sync_passphrase.
# URL of the local CAN Service (sync API is at /sync/*)
can_service_url: "http://127.0.0.1:3210"
# API key for CAN service's sync endpoints (must match sync_api_key in CAN config)
sync_api_key: "can-sync-default-key"
# Shared passphrase for peer discovery — all peers with the same passphrase
# find each other automatically over the internet via iroh relay servers.
# Change this to something unique to your team/project.
sync_passphrase: "duke-canman-sync"
# Seconds between fallback polls (SSE handles instant sync, this is a safety net)
poll_interval_secs: 30