ydb.public.api.protos.ydb_persqueue_cluster_discovery.proto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ydb-sdk-jdbc-uberjar Show documentation
Show all versions of ydb-sdk-jdbc-uberjar Show documentation
JDBC client implementation over Table client, single jar
syntax = "proto3";
import "google/protobuf/empty.proto";
import "ydb/public/api/protos/ydb_operation.proto";
package Ydb.PersQueue.ClusterDiscovery;
option java_package = "com.yandex.ydb.persqueue.cluster_discovery";
option cc_enable_arenas = true;
message WriteSessionParams {
// Path to the topic to write to.
string topic = 1;
// Message group identifier.
bytes source_id = 2;
// Partition group to write to. 0 by default.
uint32 partition_group = 3;
// Force the specified cluster via its name. Leave it empty by default.
string preferred_cluster_name = 4;
}
message ClusterInfo {
// A host discovery endpoint to use at the next step.
string endpoint = 1;
// An official cluster name.
string name = 2;
// Is the cluster available right now?
bool available = 3;
};
message ReadSessionParams {
// Path to the topic to read from.
string topic = 1;
// Read mode is set according to the read rule.
oneof read_rule {
string mirror_to_cluster = 2;
google.protobuf.Empty all_original = 3;
}
}
message WriteSessionClusters {
// Ordered clusters with statuses.
repeated ClusterInfo clusters = 1;
enum SelectionReason {
SELECTION_REASON_UNSPECIFIED = 0;
CLIENT_PREFERENCE = 1;
CLIENT_LOCATION = 2;
CONSISTENT_DISTRIBUTION = 3;
}
// The reason why a particular cluster was prioritized.
SelectionReason primary_cluster_selection_reason = 2;
}
message ReadSessionClusters {
// Ordered clusters with statuses.
repeated ClusterInfo clusters = 1;
}
message DiscoverClustersRequest {
Ydb.Operations.OperationParams operation_params = 1;
// Clusters will be discovered separately for each element of the list.
repeated WriteSessionParams write_sessions = 2;
repeated ReadSessionParams read_sessions = 3;
// Latest clusters status version known to the client application. Use 0 by default.
int64 minimal_version = 4;
}
message DiscoverClustersResponse {
// Operation contains the result of the request. Check the ydb_operation.proto.
Ydb.Operations.Operation operation = 1;
}
message DiscoverClustersResult {
// Discovered per-session clusters.
repeated WriteSessionClusters write_sessions_clusters = 1;
repeated ReadSessionClusters read_sessions_clusters = 2;
// Latest clusters status version known to the cluster discovery service.
int64 version = 3;
}