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