mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-23 11:28:59 +00:00
71fab4d250
So that we can eventually garbage collect keys that noone is asking about any more.
34 lines
1.1 KiB
Protocol Buffer
34 lines
1.1 KiB
Protocol Buffer
// Copyright (C) 2018 The Syncthing Authors.
|
|
//
|
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
syntax = "proto3";
|
|
|
|
package main;
|
|
|
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
|
|
|
option (gogoproto.goproto_getters_all) = false;
|
|
|
|
message DatabaseRecord {
|
|
repeated DatabaseAddress addresses = 1 [(gogoproto.nullable) = false];
|
|
int32 misses = 2; // Number of lookups* without hits
|
|
int64 seen = 3; // Unix nanos, last device announce
|
|
int64 missed = 4; // Unix nanos, last* failed lookup
|
|
}
|
|
|
|
// *) Not every lookup results in a write, so may not be completely accurate
|
|
|
|
message ReplicationRecord {
|
|
string key = 1;
|
|
repeated DatabaseAddress addresses = 2 [(gogoproto.nullable) = false];
|
|
int64 seen = 3; // Unix nanos, last device announce
|
|
}
|
|
|
|
message DatabaseAddress {
|
|
string address = 1;
|
|
int64 expires = 2; // Unix nanos
|
|
}
|