vor temaplte

This commit is contained in:
2025-09-29 23:04:46 +02:00
parent 36d1c1512a
commit 9122ebf2f1
6 changed files with 251 additions and 40 deletions

View File

@@ -47,6 +47,7 @@ type Item struct {
Name string `json:"name"`
UpdatedAt int64 `json:"updatedAt"`
Deleted bool `json:"deleted"` // <— NEU: Tombstone für Deletes
Owner string `json:"owner"`
}
type Snapshot struct {
@@ -92,6 +93,8 @@ func (n *Node) RemovePeer(url string) bool {
return false
}
func (n *Node) Config() Config { return n.cfg }
// PruneNow entfernt alle Peers, deren LastSeen vor cutoff liegt (Seeds bleiben).
func (n *Node) PruneNow(cutoff time.Time) int {
n.mu.Lock()