blob: 43efe79f1958689a1e9196c85626783915ceb432 [file] [edit]
syntax = "proto3";
package google.internal.platforms.remotedebug.v1;
option java_multiple_files = true;
option go_package = "/remote_debug_service";
// Data represents a chuck of data sent or received on a connection.
message Data {
// Data sent or received.
bytes data = 1
;
}
// OpenConnection initializes the connection.
// It must be be the first message before the client can send or receive any
// other data.
message OpenConnection {
// The address of the target server.
// For internal implementations this will be a 'host:port'. For calls from
// Cloud to Prod this will be an opaque identifier that would be resolved from
// an allowlist.
string target_address = 1
;
}
// ChannelRequest is a union for messages that can be sent from the client.
message ChannelRequest {
// Types of messages the client can send.
oneof message {
// Initializes the channel.
OpenConnection connect = 1;
// When connected, the client can send data to the server.
Data data = 2;
}
}
// ChannelRequest is a union for messages that can be sent from the server.
message ChannelResponse {
// When connected, the client can receive data from the server.
Data data = 1;
}
// RemoteDebugService provides a mechanism to reach remote debug daemons running
// on test machines.
service RemoteDebugService {
// Send and receive data from the server.
// When creating a channel the client must send a OpenConnection to initialize
// the channel. Then the channal has similar semantics as a TCP socket where
// data can flow asynchronously on both directions. That is to say, after the
// OpenConnect message the client can send data, but should be ready to
// receive data as well. The exact flow of data is up to the application.
// To close the channel either side can close the RPC.
rpc Channel(stream ChannelRequest) returns (stream ChannelResponse) {}
}