| 93 | } |
| 94 | |
| 95 | func (s *scope) String() string { |
| 96 | return fmt.Sprintf("[ Id: %s; User %q(%d) proxying as %q(%d) to %q(%d); RemoteAddr: %q; LocalAddr: %q; Duration: %d μs]", |
| 97 | s.id, |
| 98 | s.user.name, s.user.queryCounter.load(), |
| 99 | s.clusterUser.name, s.clusterUser.queryCounter.load(), |
| 100 | s.host.Host(), s.host.CurrentLoad(), |
| 101 | s.remoteAddr, s.localAddr, time.Since(s.startTime).Nanoseconds()/1000.0) |
| 102 | } |
| 103 | |
| 104 | //nolint:cyclop // TODO abstract user queues to reduce complexity here. |
| 105 | func (s *scope) incQueued() error { |