Expvar returns p's monitoring metrics.
()
| 146 | |
| 147 | // Expvar returns p's monitoring metrics. |
| 148 | func (p *proxy) Expvar() expvar.Var { |
| 149 | ret := &metrics.Set{} |
| 150 | ret.Set("sessions_active", &p.activeSessions) |
| 151 | ret.Set("sessions_started", &p.startedSessions) |
| 152 | ret.Set("session_errors", &p.errors) |
| 153 | return ret |
| 154 | } |
| 155 | |
| 156 | // Serve accepts postgres client connections on ln and proxies them to |
| 157 | // the configured upstream. ln can be any net.Listener, but all client |