pub struct UploadPack {
pub reader: SyncIoBridge<ReadHalf<ChannelStream<Msg>>>,
pub writer: SyncIoBridge<WriteHalf<ChannelStream<Msg>>>,
/* private fields */
}Expand description
An authenticated git-upload-pack channel exposed as blocking Read/Write.
russh is async; gix’s blocking git transport wants std::io::{Read, Write}.
We own a tokio runtime that drives the russh connection and bridge the
channel’s two halves with SyncIoBridge. The runtime + session handle are
retained so the connection stays alive for the duration of the fetch; the
reader/writer are handed (by &mut) to a gix git::Connection.
IMPORTANT: the blocking reader/writer calls must run on a thread that is
not one of this runtime’s workers (else Handle::block_on panics) — i.e.
drive gix’s fetch on the calling thread, as crate::gitio does.
Fields§
§reader: SyncIoBridge<ReadHalf<ChannelStream<Msg>>>Blocking reader over the channel’s stdout (the pack stream).
writer: SyncIoBridge<WriteHalf<ChannelStream<Msg>>>Blocking writer over the channel’s stdin (want/have negotiation).