Create "sidechannel" as a sub-protocol of "backchannel"
- Based on https://gitlab.com/gitlab-org/gitaly/-/blob/smh-muxed-stream-proto/cmd/streamrpc/main.go and #1051 (comment 639751412)
- What is now called
mux00000000
in the proof of concept would be calledsidechannel
(but we can pick another name if we want) - Backchannel server stores yamux session in AuthInfo for later retrieval from Context
- Client side code: registry (thing that callers call "Await" on)
- Server side code: function that retries yamux session, establishes side channel connection
- Special attention: concurrency, closing yamux connections on error return paths
- Because backchannel is already wired into Gitaly, there is no Gitaly server side integration work: backchannel changes automatically become available in Gitaly itself
Edited by Jacob Vosmaer