Skip to main content

teleop/
lib.rs

1//! Teleop provides a means to attach to a local process knowing its ID, and then provides RPC
2//! capabilities to the client.
3//!
4//! It currently only supports UNIX socket and Cap’n Proto RPC, but it is aimed at providing more
5//! ways to attach to a process and to communicate with it.
6//!
7//! ## UNIX socket
8//!
9//! The implementation is very much inspired by Java [Attach
10//! API](https://docs.oracle.com/javase/8/docs/technotes/guides/attach/index.html):
11//!
12//! * the process to be teleoperated waits for a signal
13//! * if some conditions are met then it opens the UNIX socket at a known location
14//! * the client can then connect to the unix socket and use the RPC protocol set up by the remote
15//!   process
16//!
17//! ## Cap'n Proto RPC
18//!
19//! Teleop provides a root interface named `Teleop` (see `teleop.capnp`) which gives access to
20//! arbitrary services.
21//!
22//! ## Example
23//!
24//! See examples in the Git repository.
25//!
26//! * The server example shows how to setup the process to teleoperate, including an `echo` service
27//!   which will reply to a request by echoing the input.
28//! * The client example shows how to setup the client, initiate the attach process, request the
29//!   `echo` service, and send echo requests.
30
31#![cfg_attr(coverage_nightly, feature(coverage_attribute))]
32
33pub mod attach;
34pub mod operate;