Просмотр исходного кода

Merge pull request #509 from adam-p/master

Add timestamp to clientlib notice output
Rod Hynes 7 лет назад
Родитель
Сommit
fed7748a64
2 измененных файлов с 3 добавлено и 7 удалено
  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
 )
 
-type noticeEvent struct {
-	Data       map[string]interface{}
-	NoticeType string
-}
-
 type startResult struct {
 	Code           startResultCode
 	ConnectTimeMS  int64  `json:",omitempty"`

+ 3 - 2
ClientLibrary/clientlib/clientlib.go

@@ -82,8 +82,9 @@ type ClientParametersDelta map[string]interface{}
 // noticeReceiver, if supplied.
 // NOTE: Ordinary users of this library should never need this.
 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