summaryrefslogtreecommitdiff
path: root/protocol/handshake.go
diff options
context:
space:
mode:
authorKeuin <[email protected]>2024-03-09 20:19:35 +0800
committerKeuin <[email protected]>2024-03-09 20:20:20 +0800
commitb933083d20b3db4a3d6a8134efe312eb6ff3d8e2 (patch)
tree2a86151c77b1eed1596b5f50ce824659e3c1fc22 /protocol/handshake.go
initial versionHEADmaster
Diffstat (limited to 'protocol/handshake.go')
-rw-r--r--protocol/handshake.go14
1 files changed, 14 insertions, 0 deletions
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