Scanner agent for SnapFS.
Project description
SnapFS Scanner Agent
The SnapFS Scanner Agent connects to the SnapFS Gateway over WebSocket and
runs snapfs scan commands on demand.
This lets the gateway (and web app) trigger scans on machines that have
direct access to storage (local filesystems, NFS mounts, etc.) without
teaching the snapfs CLI about WebSockets or long-running daemons.
The snapfs CLI remains responsible for talking HTTP to the gateway,
performing hash lookups, and publishing file.upsert events. The
scanner agent is purely a control-plane component that runs snapfs scan
as a subprocess.
Responsibilities
- Connect to the SnapFS Gateway via WebSocket as a scanner agent.
- Advertise its capabilities (e.g. a local filesystem root).
- Receive
SCAN_TARGETcommands from the gateway. - Run
snapfs scan <root> [options]locally for each command. - Report errors back to the gateway if scans fail.
the agent:
- Handles a single filesystem root (configured by
SNAPFS_SCAN_ROOT). - Runs one scan at a time.
- The
snapfsCLI toolpublishes scan events
Requirements
- SnapFS Gateway with an
/agentsWebSocket endpoint that:- accepts
AGENT_HELLOmessages, and - sends
SCAN_TARGETcommands to scanner agents.
- accepts
- Python 3.8+ (if running the agent directly).
- The
snapfsCLI installed and onPATHinside the container/host.
Running
From Python (local dev):
pip install snapfs-agent-scanner snapfs
snapfs-agent-scanner
In Docker (image built from this repo):
docker run --rm \
-e GATEWAY_WS=ws://gateway:8000 \
-e SNAPFS_AGENT_ID=scanner-01 \
-e SNAPFS_SCAN_ROOT=/mnt/data \
-v /mnt/data:/mnt/data \
ghcr.io/snapfsio/snapfs-agent-scanner:latest
Configuration
The agent is configured via environment variables:
GATEWAY_WS WebSocket base URL for the gateway (default: ws://gateway:8000)
GATEWAY_HTTP HTTP base URL for the gateway (reserved for future use)
SNAPFS_AGENT_ID Stable ID for this scanner agent (default: scanner-01)
SNAPFS_SCAN_ROOT Default filesystem root inside the container (default: /data)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file snapfs_agent_scanner-0.1.0.tar.gz.
File metadata
- Download URL: snapfs_agent_scanner-0.1.0.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4f6442d630bec72a35c53ee9e4863ea3b96dbdd034d19f1c17f9554fb0bf791
|
|
| MD5 |
d4ad2120059fb862408b480d984fff35
|
|
| BLAKE2b-256 |
b80aef247bdc698b5d79ba8691d59d5f3270123e686a8cb72614512d0749c9da
|
File details
Details for the file snapfs_agent_scanner-0.1.0-py3-none-any.whl.
File metadata
- Download URL: snapfs_agent_scanner-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c4cf77dd4a0c20109e92cb2c52b3d4f6780a2b609c9cfdf0929ada093dc4405
|
|
| MD5 |
44fb54a43499567b0794eb394da05454
|
|
| BLAKE2b-256 |
5d5047f0b6efb2144f14cfe88c9bfbe46ce6e7026650ab1b1812b0249d1fd4db
|