12 lines
624 B
Plaintext
12 lines
624 B
Plaintext
Task 2: Add GetPeerHandshakes() method to WgManager interface + impl + stub
|
|
|
|
Changes:
|
|
1. manager.go: Added PeerHandshake struct (PublicKey, LastHandshakeTime, RxBytes, TxBytes) + GetPeerHandshakes() ([]PeerHandshake, error) to WgManager interface
|
|
2. wgmanager_linux.go: Implemented on LinuxWgManager — opens wgctrl, reads device peers, returns []PeerHandshake. Uses mu.Lock/Unlock. Returns nil, nil on error.
|
|
3. wgmanager_stub.go: Implemented on StubWgManager — returns nil, nil
|
|
|
|
Verification:
|
|
- go build -tags dev ./... — PASSES
|
|
- go build ./... — PASSES
|
|
- lsp_diagnostics — CLEAN (1 pre-existing hint unrelated)
|