syntax = "proto3"; package v1.swim; enum NodeState { Alive = 0; Pending = 1; Suspected = 2; Deceased = 3; } message Member { string addr = 1; NodeState state = 2; uint64 incarnation = 3; } message Gossip { message NodeJoined { string from = 1; string new_member = 2; uint64 joined_incarnation_no = 3; } message NodeSuspected { string from = 1; string suspect = 2; uint64 suspect_incarnation_no = 3; } message NodeRecovered { string from = 1; string recovered = 2; uint64 recovered_incarnation_no = 3; } message NodeDeceased { string from = 1; string deceased = 2; uint64 deceased_incarnation_no = 3; } oneof event { NodeJoined node_joined = 1; NodeSuspected node_suspected = 2; NodeRecovered node_recovered = 3; NodeDeceased node_deceased = 4; } } message SwimMessage { message Ping { string from = 1; string requested_by = 2; repeated Gossip gossip = 3; } message PingReq { string from = 1; string suspect = 2; repeated Gossip gossip = 3; } message Ack { string from = 1; string forward_to = 2; repeated Gossip gossip = 3; } oneof action { Ping ping = 1; PingReq ping_req = 2; Ack ack = 3; } }