pass sync message version in SyncResponse

Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
This commit is contained in:
Dmitri Dolguikh
2026-07-14 17:14:16 +02:00
parent 8a3bce259d
commit 671a5f11fd
5 changed files with 1358 additions and 1284 deletions

View File

@@ -28,9 +28,6 @@ import (
//
// Peers base64(wg_pub_key) // stable across snapshots
func DecodeEnvelope(env *proto.NetworkMapEnvelope) (*types.NetworkMapComponents, error) {
if env == nil {
return nil, fmt.Errorf("nil envelope")
}
full := env.GetFull()
if full == nil {
return nil, fmt.Errorf("envelope has no Full payload")

File diff suppressed because it is too large Load Diff

View File

@@ -121,6 +121,11 @@ message SyncRequest {
PeerSystemMeta meta = 1;
}
enum SyncResponseVersion {
VersionUnknown = 0;
VersionComponentNetworkMap = 1;
}
// SyncResponse represents a state that should be applied to the local peer (e.g. Netbird servers config as well as local peer and remote peers configs)
message SyncResponse {
@@ -156,6 +161,8 @@ message SyncResponse {
// is left empty: management ships components and the client runs Calculate()
// locally instead of receiving an expanded NetworkMap.
NetworkMapEnvelope NetworkMapEnvelope = 8;
SyncResponseVersion Version = 9;
}
message SyncMetaRequest {