Skip to main content

Crate panproto_xrpc

Crate panproto_xrpc 

Source
Expand description

§panproto-xrpc

XRPC client for panproto node VCS operations.

Implements the dev.panproto.node.* XRPC endpoints for push/pull/clone of panproto-vcs objects between local stores and remote nodes.

§Endpoints

MethodEndpointDescription
GETgetObjectFetch content-addressed object (msgpack)
POSTputObjectStore object (auth required)
GETgetRefResolve ref to object ID
POSTsetRefUpdate ref (auth required)
GETlistRefsList all refs
GETgetHeadGet HEAD state
POSTnegotiateHave/want negotiation for efficient transfer
GETgetRepoInfoRepository metadata
GETlistCommitsWalk commit history from a ref
GETdiffCommitsSchema diff between two commits

§Push flow

  1. List local refs
  2. Negotiate (send local object IDs, get needed IDs)
  3. putObject for each needed object
  4. setRef for each ref

§Pull flow

  1. listRefs on remote
  2. Negotiate (send local object IDs, want remote refs)
  3. getObject for each needed object, store locally
  4. Update local refs

Re-exports§

pub use client::CommitEntry;
pub use client::CommitIdentity;
pub use client::DiffCommitsResult;
pub use client::FileDiff;
pub use client::ListCommitsResult;
pub use client::NegotiateResult;
pub use client::NodeClient;
pub use client::PullResult;
pub use client::PushResult;
pub use client::RepoInfo;
pub use error::XrpcError;

Modules§

client
XRPC client for panproto node operations. XRPC client for panproto node VCS operations.
error
Error types for XRPC operations. Error types for XRPC client operations.