diff options
Diffstat (limited to 'dashboard/message.go')
-rw-r--r-- | dashboard/message.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/dashboard/message.go b/dashboard/message.go index 46856b9e6..797b210fa 100644 --- a/dashboard/message.go +++ b/dashboard/message.go @@ -18,7 +18,6 @@ package dashboard import ( "encoding/json" - "time" ) type Message struct { @@ -34,8 +33,7 @@ type Message struct { type ChartEntries []*ChartEntry type ChartEntry struct { - Time time.Time `json:"time,omitempty"` - Value float64 `json:"value,omitempty"` + Value float64 `json:"value"` } type GeneralMessage struct { @@ -55,10 +53,14 @@ type TxPoolMessage struct { /* TODO (kurkomisi) */ } +// NetworkMessage contains information about the peers +// organized based on their IP address and node ID. type NetworkMessage struct { - /* TODO (kurkomisi) */ + Peers *peerContainer `json:"peers,omitempty"` // Peer tree. + Diff []*peerEvent `json:"diff,omitempty"` // Events that change the peer tree. } +// SystemMessage contains the metered system data samples. type SystemMessage struct { ActiveMemory ChartEntries `json:"activeMemory,omitempty"` VirtualMemory ChartEntries `json:"virtualMemory,omitempty"` @@ -70,7 +72,7 @@ type SystemMessage struct { DiskWrite ChartEntries `json:"diskWrite,omitempty"` } -// LogsMessage wraps up a log chunk. If Source isn't present, the chunk is a stream chunk. +// LogsMessage wraps up a log chunk. If 'Source' isn't present, the chunk is a stream chunk. type LogsMessage struct { Source *LogFile `json:"source,omitempty"` // Attributes of the log file. Chunk json.RawMessage `json:"chunk"` // Contains log records. @@ -87,6 +89,7 @@ type Request struct { Logs *LogsRequest `json:"logs,omitempty"` } +// LogsRequest contains the attributes of the log file the client wants to receive. type LogsRequest struct { Name string `json:"name"` // The request handler searches for log file based on this file name. Past bool `json:"past"` // Denotes whether the client wants the previous or the next file. |