| 1 | package ami |
| 2 | |
| 3 | import ( |
| 4 | "bufio" |
| 5 | "context" |
| 6 | "net" |
| 7 | "sync" |
| 8 | |
| 9 | "go.uber.org/zap" |
| 10 | "golang.org/x/sync/errgroup" |
| 11 | ) |
| 12 | |
| 13 | type Conn struct { |
| 14 | g *errgroup.Group |
| 15 | conn net.Conn |
| 16 | reader *bufio.Reader |
| 17 | nextID func() string |
| 18 | pending chan *asyncMsg |
| 19 | recv chan *Message |
| 20 | ctx context.Context |
| 21 | closer context.CancelFunc |
| 22 | closed bool |
| 23 | |
| 24 | version string |
| 25 | logger *zap.Logger |
| 26 | conf *ConnectOptions |
| 27 | subs []*subscribe |
| 28 | subLoc sync.Mutex |
| 29 | } |