Expand description
The wire codec and the client sessions of the ostrya push and pull.
A caller pushes a local directory as a commit that the server makes with
push_tree, or its own objects with a PushSession. A PullSession reads the summary and the ref listings of a remote. The
crate has no repository knowledge, and it compiles on Linux, macOS, and Windows.
§Entry points
Endpoint::parsereads an address into anEndpoint.push_treepushes a local directory to an endpoint as one server commit.PushSession::connectopens a push session to an endpoint.PushSession::preparechecks an endpoint before the session opens.PushSession::over_streamopens a push session over a pair of byte streams.PullSession::connectopens the session of a pull to an endpoint.StreamSession::connectopens a stream session over ssh.StreamSession::check_command_linechecks the ssh command line of a pull before the session opens.Erroris the error of each fallible operation.
§Modules
proto: the wire format and its codec.session: the push and pull sessions, their progress, and the one-way stream.transport: the endpoints, the addresses, and the ssh and HTTP transports.tree: the walk and the hash of a local directory.
§Features
smol(default): thesmolbackend ofostrya-rtfor the ssh and HTTP transports.tokio: thetokiobackend ofostrya-rtfor the ssh and HTTP transports.
§Examples
use ostrya_remote::{TreePushOptions, push_tree, transport::Endpoint};
let endpoint = Endpoint::parse("ssh://builder@repo.example.com/srv/repo")?;
let opts = TreePushOptions { onto: "exampleos/stable".into(), ..Default::default() };
let outcome = push_tree(endpoint, "rootfs".as_ref(), opts).await?;
println!("{:?}", outcome.commit);Modules§
- proto
- The wire format of the push and the pull, and its codec.
- session
- The client sessions of the push and of the pull, and the one-way stream.
- transport
- The endpoints, and the ssh and HTTP transports of the sessions.
- tree
- The walk of a local directory into a tree model.
Structs§
- Tree
Push Options - The options of a tree push.
Enums§
Functions§
- push_
tree - Pushes the directory
roottoendpointas one server commit. - push_
tree_ over_ stream - Pushes the directory
rootas one server commit over a pair of byte streams. - push_
tree_ prepared - Pushes the directory
rootas one server commit over a prepared transport.