Skip to content

Commit

Permalink
feat: add DeleteSeedPeer api
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi committed Aug 2, 2023
1 parent ebcd959 commit 035cb3d
Show file tree
Hide file tree
Showing 9 changed files with 919 additions and 434 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dragonfly-api"
version = "2.0.15"
version = "2.0.16"
authors = ["Gaius <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
976 changes: 543 additions & 433 deletions pkg/apis/manager/v2/manager.pb.go

Large diffs are not rendered by default.

181 changes: 181 additions & 0 deletions pkg/apis/manager/v2/manager.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions pkg/apis/manager/v2/manager.proto
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,18 @@ message UpdateSeedPeerRequest {
int32 object_storage_port = 10 [(validate.rules).int32 = {gte: 1024, lt: 65535, ignore_empty: true}];
}

// DeleteSeedPeerRequest represents request of DeleteSeedPeer.
message DeleteSeedPeerRequest {
// Request source type.
SourceType source_type = 1 [(validate.rules).enum.defined_only = true];
// Seed peer hostname.
string hostname = 2 [(validate.rules).string.hostname = true];
// ID of the cluster to which the seed peer belongs.
uint64 seed_peer_cluster_id = 3 [(validate.rules).uint64 = {gte: 1}];
// Seed peer ip.
string ip = 4 [(validate.rules).string = {ip: true, ignore_empty: true}];
}

// SeedPeerCluster represents cluster of scheduler.
message SchedulerCluster {
// Cluster id.
Expand Down Expand Up @@ -362,6 +374,9 @@ service Manager {
// Update SeedPeer configuration.
rpc UpdateSeedPeer(UpdateSeedPeerRequest) returns(SeedPeer);

// Delete SeedPeer configuration.
rpc DeleteSeedPeer(DeleteSeedPeerRequest) returns(google.protobuf.Empty);

// Get Scheduler and Scheduler cluster configuration.
rpc GetScheduler(GetSchedulerRequest)returns(Scheduler);

Expand Down
38 changes: 38 additions & 0 deletions pkg/apis/manager/v2/manager_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions pkg/apis/manager/v2/mocks/manager_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions proto/manager.proto
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,18 @@ message UpdateSeedPeerRequest {
int32 object_storage_port = 10;
}

// DeleteSeedPeerRequest represents request of DeleteSeedPeer.
message DeleteSeedPeerRequest {
// Request source type.
SourceType source_type = 1;
// Seed peer hostname.
string hostname = 2;
// ID of the cluster to which the seed peer belongs.
uint64 seed_peer_cluster_id = 3;
// Seed peer ip.
string ip = 4;
}

// SeedPeerCluster represents cluster of scheduler.
message SchedulerCluster {
// Cluster id.
Expand Down Expand Up @@ -357,6 +369,9 @@ service Manager {
// Update SeedPeer configuration.
rpc UpdateSeedPeer(UpdateSeedPeerRequest) returns(SeedPeer);

// Delete SeedPeer configuration.
rpc DeleteSeedPeer(DeleteSeedPeerRequest) returns(google.protobuf.Empty);

// Get Scheduler and Scheduler cluster configuration.
rpc GetScheduler(GetSchedulerRequest)returns(Scheduler);

Expand Down
Binary file modified src/descriptor.bin
Binary file not shown.
Loading

0 comments on commit 035cb3d

Please sign in to comment.