ping json mapping
This commit is contained in:
parent
a2472a88ab
commit
54f395b764
|
@ -77,12 +77,12 @@ func (r *PingResponse) GetError() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
type PingSummary struct {
|
type PingSummary struct {
|
||||||
SendCount int
|
SendCount int `json:"sendCount,omitempty"`
|
||||||
ReceiveCount int
|
ReceiveCount int `json:"receiveCount,omitempty"`
|
||||||
LossPercent float32
|
LossPercent float32 `json:"lossPercent,omitempty"`
|
||||||
MinTime float32
|
MinTime float32 `json:"minTime,omitempty"`
|
||||||
MaxTime float32
|
MaxTime float32 `json:"maxTime,omitempty"`
|
||||||
AvgTime float32
|
AvgTime float32 `json:"avgTime,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *PingSummary) GetSendCount() int {
|
func (s *PingSummary) GetSendCount() int {
|
||||||
|
@ -105,8 +105,8 @@ func (s *PingSummary) GetAvgTime() float32 {
|
||||||
}
|
}
|
||||||
|
|
||||||
type PingResult struct {
|
type PingResult struct {
|
||||||
Responses map[int]Response
|
Responses map[int]Response `json:"responses,omitempty"`
|
||||||
Summary Summary
|
Summary Summary `json:"summary,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *PingResult) GetResponses() map[int]Response {
|
func (r *PingResult) GetResponses() map[int]Response {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user