// Quickwit
// Copyright (C) 2021 Quickwit Inc.
//
// Quickwit is offered under the AGPL v3.0 and as commercial software.
// For commercial licensing, contact us at hello@quickwit.io.
//
// AGPL:
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
syntax = "proto3";
package cluster;
service ClusterService {
/// Retrieves members of the cluster.
rpc ListMembers(ListMembersRequest) returns (ListMembersResponse);
/// Removes itself from the cluster.
/// Removed node will be isolated from the cluster.
rpc LeaveCluster(LeaveClusterRequest) returns (LeaveClusterResponse);
rpc ClusterState(ClusterStateRequest) returns (ClusterStateResponse);
}
/// The member information.
message Member {
/// Member ID. A string of the UUID.
string id = 1;
/// Cluster listen address. string of IP and port number.
/// E.g. 127.0.0.1:5000
string listen_address = 2;
/// If true, it means self.
bool is_self = 3;
/// member reincarnation
uint64 generation = 4;
}
message ListMembersRequest {
}
message ListMembersResponse {
repeated Member members = 1;
}
message LeaveClusterRequest {
}
message LeaveClusterResponse {
}
message ClusterStateRequest {
}
message ClusterStateResponse {
string state_serialized_json = 1;
}