Skip to main content

ConnectTransport

Struct ConnectTransport 

Source
pub struct ConnectTransport<B, N, H> { /* private fields */ }
Expand description

TransportService over a Pipeline. Each handler takes the Authenticated that super::AuthInterceptor stored for existing RPCs; GetServerInfo is deliberately unauthenticated. The M2 RPCs remain explicit stubs until their implementing WPs land.

Implementations§

Source§

impl<B, N, H> ConnectTransport<B, N, H>

Source

pub fn new(pipeline: Arc<Pipeline<B, N, H>>) -> Self

The service over pipeline.

Trait Implementations§

Source§

impl<B, N, H> Debug for ConnectTransport<B, N, H>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<B, N, H> TransportService for ConnectTransport<B, N, H>
where B: MultipartBlobStore + 'static, N: NamespaceStore + 'static, H: HookSet + 'static,

Source§

async fn list_repos( &self, ctx: RequestContext, request: ServiceRequest<'_, ListReposRequest>, ) -> ServiceResult<ListReposResponse>

List readable repository names in a namespace (STC §7.10). Read more
Source§

async fn list_refs( &self, ctx: RequestContext, request: ServiceRequest<'_, ListRefsRequest>, ) -> ServiceResult<ListRefsResponse>

List refs whose full name starts with prefix. Returned names have prefix stripped, per SPEC-REFS §4. An empty prefix lists every ref. Read more
Source§

async fn read_ref( &self, ctx: RequestContext, request: ServiceRequest<'_, ReadRefRequest>, ) -> ServiceResult<ReadRefResponse>

Read a ref’s current value. exists = false if absent. Read more
Source§

async fn update_ref( &self, ctx: RequestContext, request: ServiceRequest<'_, UpdateRefRequest>, ) -> ServiceResult<UpdateRefResponse>

CAS ref write. Connect code failed_precondition on a CAS mismatch (MISSING on an existing ref, or MATCH on a different current value); invalid_argument on REF_EXPECTATION_UNSPECIFIED. See SPEC-TRANSPORT-CONNECT §3 — the response never carries the current ref value; a client that needs to disambiguate MUST follow up with ReadRef. Read more
Source§

async fn advance_refs( &self, ctx: RequestContext, request: ServiceRequest<'_, AdvanceRefsRequest>, ) -> ServiceResult<AdvanceRefsResponse>

Atomically advance a branch’s head ref and packmap ref together, each under its own CAS precondition. See SPEC-TRANSPORT-CONNECT §4. Read more
Source§

async fn pack_exists( &self, ctx: RequestContext, request: ServiceRequest<'_, PackExistsRequest>, ) -> ServiceResult<PackExistsResponse>

HEAD-check a pack by digest. Read more
Source§

async fn upload_pack( &self, ctx: RequestContext, requests: InboundStream<UploadPackRequest>, ) -> ServiceResult<UploadPackResponse>

Client-streaming pack upload. The first message on the stream MUST be header; every subsequent message MUST be chunk, in ascending contiguous offset order, ending with a chunk.last = true message. The server MUST reject a stream whose received byte count does not equal header.total_bytes or whose BLAKE3 does not equal header.pack_id, and MUST NOT store partial bytes on rejection. See SPEC-TRANSPORT-CONNECT §6. Read more
Source§

async fn download_pack( &self, ctx: RequestContext, request: ServiceRequest<'_, DownloadPackRequest>, ) -> ServiceResult<ServiceStream<DownloadPackResponse>>

Server-streaming pack download. The first message on the stream MUST be header; every subsequent message MUST be chunk, ending with a chunk.last = true message. Connect code not_found (raised before any message is sent) if the digest is absent. See SPEC-TRANSPORT-CONNECT §6. Read more
Source§

async fn get_server_info( &self, _ctx: RequestContext, _request: ServiceRequest<'_, GetServerInfoRequest>, ) -> ServiceResult<GetServerInfoResponse>

Discover deployment capabilities without authentication (SPEC-TRANSPORT-CONNECT §2.1). Read more
Source§

async fn get_receipt( &self, _ctx: RequestContext, _request: ServiceRequest<'_, GetReceiptRequest>, ) -> ServiceResult<GetReceiptResponse>

Fetch a retained writer-view storage receipt (SPEC-SERVER §15). Read more
Source§

async fn begin_upload( &self, ctx: RequestContext, request: ServiceRequest<'_, BeginUploadRequest>, ) -> ServiceResult<BeginUploadResponse>

Reserve an upload for a ref (SPEC-TRANSPORT-CONNECT §7.6). Read more
Source§

async fn upload_part( &self, ctx: RequestContext, requests: InboundStream<UploadPartRequest>, ) -> ServiceResult<UploadPartResponse>

Stream one ticketed upload part (SPEC-TRANSPORT-CONNECT §7.6). Read more
Source§

async fn complete_upload( &self, ctx: RequestContext, request: ServiceRequest<'_, CompleteUploadRequest>, ) -> ServiceResult<CompleteUploadResponse>

Complete a multipart upload using its receipts (SPEC-TRANSPORT-CONNECT §7.6). Read more
Source§

async fn get_grant_epoch( &self, _ctx: RequestContext, request: ServiceRequest<'_, GetGrantEpochRequest>, ) -> ServiceResult<GetGrantEpochResponse>

Namespace grant epoch RPCs (SPEC-WRITE-GRANTS §5.3). Read more
Source§

async fn set_grant_epoch( &self, _ctx: RequestContext, request: ServiceRequest<'_, SetGrantEpochRequest>, ) -> ServiceResult<SetGrantEpochResponse>

Handle the SetGrantEpoch RPC. Read more
Source§

async fn get_authority_generation( &self, _ctx: RequestContext, request: ServiceRequest<'_, GetAuthorityGenerationRequest>, ) -> ServiceResult<GetAuthorityGenerationResponse>

Outside auth-v2; the setter verifies a deployment-authority statement. Read more
Source§

async fn set_authority_generation( &self, _ctx: RequestContext, request: ServiceRequest<'_, SetAuthorityGenerationRequest>, ) -> ServiceResult<SetAuthorityGenerationResponse>

Handle the SetAuthorityGeneration RPC. Read more
Source§

async fn set_repo_visibility( &self, ctx: RequestContext, request: ServiceRequest<'_, SetRepoVisibilityRequest>, ) -> ServiceResult<SetRepoVisibilityResponse>

Repository visibility and URL tokens (SPEC-WRITE-GRANTS §9.1, §9.4). Read more
Source§

async fn issue_object_url( &self, ctx: RequestContext, request: ServiceRequest<'_, IssueObjectUrlRequest>, ) -> ServiceResult<IssueObjectUrlResponse>

Handle the IssueObjectUrl RPC. Read more

Auto Trait Implementations§

§

impl<B, N, H> !RefUnwindSafe for ConnectTransport<B, N, H>

§

impl<B, N, H> !UnwindSafe for ConnectTransport<B, N, H>

§

impl<B, N, H> Freeze for ConnectTransport<B, N, H>
where Shared<Pipeline<B, N, H>>: Freeze,

§

impl<B, N, H> Send for ConnectTransport<B, N, H>
where Shared<Pipeline<B, N, H>>: Send,

§

impl<B, N, H> Sync for ConnectTransport<B, N, H>
where Shared<Pipeline<B, N, H>>: Sync,

§

impl<B, N, H> Unpin for ConnectTransport<B, N, H>
where Shared<Pipeline<B, N, H>>: Unpin,

§

impl<B, N, H> UnsafeUnpin for ConnectTransport<B, N, H>
where Shared<Pipeline<B, N, H>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> MaybeSend for T
where T: Send + ?Sized,

Source§

impl<T> MaybeSync for T
where T: Sync + ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<S> TransportServiceExt for S

Source§

fn register(self: Arc<S>, router: Router) -> Router

Register this service implementation with a Router. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more