Skip to main content

Module seam

Module seam 

Source
Expand description

The one remaining seam: temporary, and marked so.

§What used to be here, and why it is gone

This module carried three traits, because gunnar-core (the ACL model) and gunnar-wire (the git wire protocol) were being written in parallel with this crate and blocking on either would have meant writing no server at all.

gunnar-core has landed, so two of them are deleted. AuthDirectory and RepoResolver are now crate::control::Control over the real AuthTable and RepoCatalog, and their test doubles went with them. They were not thin adapters worth keeping: both returned Option, and gunnar-core deliberately returns Result because the table lives in storage and a read can fail. Adapting one to the other means choosing an answer for the failure case, and the safe-looking choice (None) turns a storage fault into a silent permission denial. That is precisely what the ACL model says not to do, and it is what the seam was doing.

gunnar-wire has not landed, so GitTransport stays exactly as it was. It is the seam the protocol state machines plug into, and wiring it is a separate job.

traitdelegates tostatus
AuthDirectorygunnar_core::AuthTabledeleted
RepoResolvergunnar_core::RepoCatalogdeleted
GitTransportgunnar-wire’s upload_pack / receive_packstill a seam

§The test double

BannerTransport is a test double, not a backend. It exists so this crate’s tests can prove the SSH machinery end to end without gunnar-wire. Nothing outside a test should construct it.

Structs§

BannerTransport
A GitTransport that writes one line describing the request it was given, then reads the client out. A test double.
LfsAccess
An authorised repository’s LFS object store, and what it will accept.
ServiceRequest
Everything the wire needs to know about the session it is serving.
TransportHold
The release lever of BannerTransport::holding.

Enums§

Delivery
Which part of a git conversation one call to the seam carries.
TransportError
What went wrong while serving.

Traits§

DuplexStream
A bidirectional byte stream: what an SSH channel is once the exec has been accepted.
GitTransport
Serve git-upload-pack / git-receive-pack over an accepted channel.
LfsTransport
Open the LFS object store of a repository a caller has already been authorised for.