()
| 49 | } |
| 50 | |
| 51 | func (s *Session) String() string { |
| 52 | o := &struct { |
| 53 | Ops int64 `json:"ops"` |
| 54 | CreateUnix int64 `json:"create"` |
| 55 | LastOpUnix int64 `json:"lastop,omitempty"` |
| 56 | RemoteAddr string `json:"remote"` |
| 57 | }{ |
| 58 | s.Ops, s.CreateUnix, s.LastOpUnix, |
| 59 | s.Conn.RemoteAddr(), |
| 60 | } |
| 61 | b, _ := json.Marshal(o) |
| 62 | return string(b) |
| 63 | } |
| 64 | |
| 65 | func NewSession(sock net.Conn, config *Config) *Session { |
| 66 | c := redis.NewConn(sock, |
nothing calls this directly
no test coverage detected