From b23a508d45ce6d7d6a720dc734f88f2ce1fac85f Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 30 Apr 2017 02:54:38 +0200 Subject: improved protocol docs --- doc/protocol.md | 5 ++++- src/hub/src/spreadspace.org/sfive/s5typesApi.go | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/protocol.md b/doc/protocol.md index fdd51ee..ff0cc51 100644 --- a/doc/protocol.md +++ b/doc/protocol.md @@ -4,7 +4,7 @@ Messages init ---- -All fields except version are optional. The values in this message are treated as +All fields except "version" are optional. The values in this message are treated as defaults which will be used if the corresponding value is missing in subsequent update messages. @@ -24,6 +24,9 @@ values from data updates override values from init. Stateless interfaces will no init messages and therefore all values must be defined here. If an interface (i.e. REST) has other means to detect protocol versions the version field may be omitted entirely. +"SourceHubUuid", "SourceHubDataUpdateId", "user-agent", "bytes-received", "tags" and +"clients" might be omitted and are treated as an empty string, 0 or empty array +respectively. The start-time will be processesd and stored with millisecond precision. { diff --git a/src/hub/src/spreadspace.org/sfive/s5typesApi.go b/src/hub/src/spreadspace.org/sfive/s5typesApi.go index 0cd5100..265380c 100644 --- a/src/hub/src/spreadspace.org/sfive/s5typesApi.go +++ b/src/hub/src/spreadspace.org/sfive/s5typesApi.go @@ -43,7 +43,7 @@ type StreamId struct { type SourceId struct { Hostname string `json:"hostname"` StreamId StreamId `json:"streamer-id"` - Tags []string `json:"tags"` + Tags []string `json:"tags,omitempty"` } type ClientData struct { -- cgit v1.2.3