Flatten varz, add todo items to add

This commit is contained in:
Derek Collison
2015-08-05 06:31:48 -07:00
parent 5162612619
commit 1611530085
2 changed files with 4 additions and 3 deletions

View File

@@ -17,6 +17,7 @@
- [ ] Info updates contain other implicit route servers
- [ ] Multi-tenant accounts with isolation of subject space
- [ ] Support sort options for /connz via nats-top
- [ ] Add to varz, time for slow consumers, peek connections, memory, etc.
- [X] Dropped message statistics (slow consumers)
- [X] Add current time to each monitoring endpoint
- [X] varz uptime do days and only integer secs

View File

@@ -233,8 +233,8 @@ func (s *Server) HandleSubsz(w http.ResponseWriter, r *http.Request) {
// Varz will output server information on the monitoring port at /varz.
type Varz struct {
Information *Info `json:"info"`
Options *Options `json:"options"`
*Info
*Options
Start time.Time `json:"start"`
Now time.Time `json:"now"`
Uptime string `json:"uptime"`
@@ -282,7 +282,7 @@ func myUptime(d time.Duration) string {
// HandleVarz will process HTTP requests for server information.
func (s *Server) HandleVarz(w http.ResponseWriter, r *http.Request) {
v := &Varz{Information: &s.info, Options: s.opts, Start: s.start}
v := &Varz{Info: &s.info, Options: s.opts, Start: s.start}
v.Now = time.Now()
v.Uptime = myUptime(time.Since(s.start))