<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sourcewatch.git/types.go, branch main</title>
<subtitle>experimental filesync for windows docker bindmounts</subtitle>
<link rel='alternate' type='text/html' href='https://git.begu.at/sourcewatch.git/'/>
<entry>
<title>Add FNV-1a content hash to detect same-size changes</title>
<updated>2026-07-07T21:17:20+00:00</updated>
<author>
<name>Bernhard Guillon</name>
<email>Bernhard.Guillon@begu.org</email>
</author>
<published>2026-07-07T21:17:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.begu.at/sourcewatch.git/commit/?id=a62e42b9be8402301631c9043f640eb7f43eff29'/>
<id>a62e42b9be8402301631c9043f640eb7f43eff29</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add Windows-assisted initial sync for faster startup</title>
<updated>2026-07-07T07:20:10+00:00</updated>
<author>
<name>Bernhard Guillon</name>
<email>Bernhard.Guillon@begu.org</email>
</author>
<published>2026-07-07T07:20:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.begu.at/sourcewatch.git/commit/?id=0642028735adcb2d431e5e146ca87accb4954900'/>
<id>0642028735adcb2d431e5e146ca87accb4954900</id>
<content type='text'>
New protocol:
- Windows binary scans directory (fast native NTFS) and sends manifest
- Container receives manifest, compares with local /data state
- Only copies files that differ (size, modtime, mode, symlink)

Protocol messages:
- manifest: sends full file metadata from Windows
- manifest_done: signals manifest transfer complete
- event_create/write/remove: file change events

Flow:
1. Container connects to socket
2. Windows binary sends manifest (file metadata)
3. Container scans /data (fast local volume)
4. Container copies only changed files from /host (9P bind mount)
5. Container enters event-waiting loop

This dramatically speeds up initial sync by avoiding slow 9P scans.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
New protocol:
- Windows binary scans directory (fast native NTFS) and sends manifest
- Container receives manifest, compares with local /data state
- Only copies files that differ (size, modtime, mode, symlink)

Protocol messages:
- manifest: sends full file metadata from Windows
- manifest_done: signals manifest transfer complete
- event_create/write/remove: file change events

Flow:
1. Container connects to socket
2. Windows binary sends manifest (file metadata)
3. Container scans /data (fast local volume)
4. Container copies only changed files from /host (9P bind mount)
5. Container enters event-waiting loop

This dramatically speeds up initial sync by avoiding slow 9P scans.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add Windows native watcher with Unix socket IPC</title>
<updated>2026-07-07T07:03:31+00:00</updated>
<author>
<name>Bernhard Guillon</name>
<email>Bernhard.Guillon@begu.org</email>
</author>
<published>2026-07-07T07:03:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.begu.at/sourcewatch.git/commit/?id=a0d157d45c5b4c63afc2cfc82bde3ae3207bc455'/>
<id>a0d157d45c5b4c63afc2cfc82bde3ae3207bc455</id>
<content type='text'>
Architecture:
- Windows binary: watches files via ReadDirectoryChangesW (fsnotify),
  sends events as newline-delimited JSON over Unix domain socket
- Container: performs initial sync, then listens on socket for events
  from Windows watcher

New files:
- cmd_windows.go: Windows serve command (watcher + socket server)
- cmd_linux.go: Linux socket client + event listener
- types.go: shared FileEvent, FileMeta, Manifest types
- watcher_test_helper.go: inotify-based watcher for integration tests

Changes:
- main.go: simplified to just call run()
- watcher.go: removed fsnotify dependency, extracted Watcher interface
- sync.go: removed duplicate type definitions
- watcher_test.go: uses watchForTests() helper

Usage:
  sourcewatch.exe -dir C:\myproject -socket D:\sourcewatch.sock
  docker run -v D:\sourcewatch.sock:/run/sourcewatch.sock \
             -v C:\myproject:/host:ro -v mydata:/data sourcewatch
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Architecture:
- Windows binary: watches files via ReadDirectoryChangesW (fsnotify),
  sends events as newline-delimited JSON over Unix domain socket
- Container: performs initial sync, then listens on socket for events
  from Windows watcher

New files:
- cmd_windows.go: Windows serve command (watcher + socket server)
- cmd_linux.go: Linux socket client + event listener
- types.go: shared FileEvent, FileMeta, Manifest types
- watcher_test_helper.go: inotify-based watcher for integration tests

Changes:
- main.go: simplified to just call run()
- watcher.go: removed fsnotify dependency, extracted Watcher interface
- sync.go: removed duplicate type definitions
- watcher_test.go: uses watchForTests() helper

Usage:
  sourcewatch.exe -dir C:\myproject -socket D:\sourcewatch.sock
  docker run -v D:\sourcewatch.sock:/run/sourcewatch.sock \
             -v C:\myproject:/host:ro -v mydata:/data sourcewatch
</pre>
</div>
</content>
</entry>
</feed>
