influxdb/gossip/proto/gossip.proto

55 lines
1.4 KiB
Protocol Buffer

syntax = "proto3";
package influxdata.iox.gossip.v1;
option go_package = "github.com/influxdata/iox/gossip/v1";
// The payload of a single gossip datagram.
message Frame {
// Per-instance UUID as raw BE bytes.
bytes identity = 1;
// One or more user/control frames packed into a single message.
repeated FrameMessage messages = 2;
}
// A single gossip message within a frame.
message FrameMessage {
// Various user/control message types.
oneof payload {
Ping ping = 1;
Pong pong = 2;
// User-provided data payload.
UserPayload user_data = 3;
}
}
message Ping {}
// A response to a PING, containg the set of peers known to the sender.
//
// A sequence of ping/pong frames acts as a peer-exchange mechanism between
// peers.
message Pong {
// A set of peers known to the sender.
//
// Some of these peers may already be unreachable, and the receiver should not
// add them to their peer list without validating liveness.
repeated Peer peers = 1;
}
message Peer {
// A unique identifer (UUID) self-assigned by this peer as raw BE bytes.
bytes identity = 1;
// A socket (IP & port) address in the form "ip:port", as discovered by the
// PONG sender.
string address = 2;
}
// An application payload from the caller of the gossip library.
message UserPayload {
// An opaque user payload - this is handed back to the gossip library user
// unmodified.
bytes payload = 1;
}