[−][src]Module crosis::protocol
This is the underlying protocol which Crosis uses to interface with Replit's containers.
Protocol is the protobuf-based interface which defines how data is sent and received from a Replit container. All data that is exchanged uses the same Command structure; instead, the body of the Command is what changes to fit the necessary sent/received data structure.
Example
// get protocol from crosis use crosis::protocol; // create a command let command = protocol::Command { // channel and session act as namespaces (0 being global) channel: 0, session: 0, // can be used to identify a response message/event ("" being no ref) r#ref: String::new(), // the command you want to send (example command) body: Some(protocol::command::Body::Ping(protocol::Ping {})) }; // do stuff with command
Notes
If you want to use the Protocol by itself - without the higher-level
Crosis API - you can use default-features = false
in Cargo.toml
.
This implementaion uses prost for encoding and decoding protobuf data.
Modules
boot_status | |
close_channel | |
close_channel_res | |
command | |
container_state | |
file | |
file_event | |
open_channel | |
open_channel_res | |
ot_rune_transform_op | |
pprof_request | |
vcr_entry |
Structs
Enums
FileAuthMethod | |
State |