From b933083d20b3db4a3d6a8134efe312eb6ff3d8e2 Mon Sep 17 00:00:00 2001 From: Keuin Date: Sat, 9 Mar 2024 20:19:35 +0800 Subject: initial version --- protocol/handshake.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 protocol/handshake.go (limited to 'protocol/handshake.go') diff --git a/protocol/handshake.go b/protocol/handshake.go new file mode 100644 index 0000000..02e3f0d --- /dev/null +++ b/protocol/handshake.go @@ -0,0 +1,14 @@ +package protocol + +const ( + TokenHeader = "X-Observatory-Token" + ObserverIDHeader = "X-Observatory-Observer-ID" +) + +// ServerPushInfo is the first server->client packet, applying configs to observers +type ServerPushInfo struct { + Version uint64 `json:"server_push_info_version"` + Targets []Target `json:"targets"` +} + +const CurrentServerPushInfoVersion uint64 = 240308 -- cgit v1.2.3