telebit/rvpn/server/api_collect_connections.go

16 lines
422 B
Go
Raw Normal View History

2017-04-01 04:19:50 +00:00
package server
2017-03-23 23:10:49 +00:00
//ConnectionStatsAPI --
type ConnectionStatsAPI struct {
Connections int64 `json:"current_connections"`
TotalConnections int64 `json:"total_connections"`
}
//NewConnectionStatsAPI -- Consttuctor
func NewConnectionStatsAPI(connections int64, totalConnections int64) (p *ConnectionStatsAPI) {
p = new(ConnectionStatsAPI)
p.Connections = connections
p.TotalConnections = totalConnections
return
}