2017-04-01 04:19:50 +00:00
|
|
|
package server
|
2017-03-20 00:04:47 +00:00
|
|
|
|
|
|
|
//TrafficStats --
|
|
|
|
type TrafficAPI struct {
|
|
|
|
Requests int64
|
|
|
|
Responses int64
|
|
|
|
BytesIn int64
|
|
|
|
BytesOut int64
|
|
|
|
}
|
|
|
|
|
|
|
|
//NewTrafficStats -- Consttuctor
|
2017-03-22 22:33:09 +00:00
|
|
|
func NewTrafficAPI(requests, responses, bytesIn, bytesOut int64) (p *TrafficAPI) {
|
2017-03-20 00:04:47 +00:00
|
|
|
p = new(TrafficAPI)
|
|
|
|
p.Requests = requests
|
|
|
|
p.Responses = responses
|
2017-03-22 22:33:09 +00:00
|
|
|
p.BytesIn = bytesIn
|
|
|
|
p.BytesOut = bytesOut
|
2017-03-20 00:04:47 +00:00
|
|
|
|
|
|
|
return
|
2017-03-22 22:33:09 +00:00
|
|
|
}
|