mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Flatten varz, add todo items to add
This commit is contained in:
1
TODO.md
1
TODO.md
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user