Sfoglia il codice sorgente

Merge pull request #509 from adam-p/master

Add timestamp to clientlib notice output
Rod Hynes 7 anni fa
parent
commit
fed7748a64
2 ha cambiato i file con 3 aggiunte e 7 eliminazioni
  1. 0 5
      ClientLibrary/PsiphonTunnel.go
  2. 3 2
      ClientLibrary/clientlib/clientlib.go

+ 0 - 5
ClientLibrary/PsiphonTunnel.go

@@ -77,11 +77,6 @@ const (
 	startResultCodeOtherError                 = 2
 	startResultCodeOtherError                 = 2
 )
 )
 
 
-type noticeEvent struct {
-	Data       map[string]interface{}
-	NoticeType string
-}
-
 type startResult struct {
 type startResult struct {
 	Code           startResultCode
 	Code           startResultCode
 	ConnectTimeMS  int64  `json:",omitempty"`
 	ConnectTimeMS  int64  `json:",omitempty"`

+ 3 - 2
ClientLibrary/clientlib/clientlib.go

@@ -82,8 +82,9 @@ type ClientParametersDelta map[string]interface{}
 // noticeReceiver, if supplied.
 // noticeReceiver, if supplied.
 // NOTE: Ordinary users of this library should never need this.
 // NOTE: Ordinary users of this library should never need this.
 type NoticeEvent struct {
 type NoticeEvent struct {
-	Data map[string]interface{} `json:"data"`
-	Type string                 `json:"noticeType"`
+	Data      map[string]interface{} `json:"data"`
+	Type      string                 `json:"noticeType"`
+	Timestamp string                 `json:"timestamp"`
 }
 }
 
 
 // ErrTimeout is returned when the tunnel connection attempt fails due to timeout
 // ErrTimeout is returned when the tunnel connection attempt fails due to timeout