Function
newSession
(ctx context.Context, cancel context.CancelFunc, cfg Config, stream nodev1.NodeAgent_SessionClient)
Source from the content-addressed store, hash-verified
| 86 | } |
| 87 | |
| 88 | func newSession(ctx context.Context, cancel context.CancelFunc, cfg Config, stream nodev1.NodeAgent_SessionClient) *session { |
| 89 | return &session{ |
| 90 | ctx: ctx, |
| 91 | cancel: cancel, |
| 92 | cfg: cfg, |
| 93 | stream: stream, |
| 94 | inflight: make(map[string]context.CancelFunc), |
| 95 | acks: make(map[uint64]chan struct{}), |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | func (s *session) sendRaw(msg *nodev1.NodeMessage) error { |
| 100 | s.sendMu.Lock() |
Tested by
no test coverage detected