Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add download port #149

Merged
merged 1 commit into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.2"
version = "2.0.3"
authors = ["Gaius <[email protected]>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
449 changes: 231 additions & 218 deletions pkg/apis/common/v2/common.pb.go

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions pkg/apis/common/v2/common.pb.validate.go

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

22 changes: 12 additions & 10 deletions pkg/apis/common/v2/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -184,26 +184,28 @@ message Host {
string ip = 4 [(validate.rules).string.ip = true];
// Port of grpc service.
int32 port = 5 [(validate.rules).int32 = {gte: 1024, lt: 65535}];
// Port of download server.
int32 download_port = 6 [(validate.rules).int32 = {gte: 1024, lt: 65535}];
// Host OS.
string os = 6;
string os = 7;
// Host platform.
string platform = 7;
string platform = 8;
// Host platform family.
string platform_family = 8;
string platform_family = 9;
// Host platform version.
string platform_version = 9;
string platform_version = 10;
// Host kernel version.
string kernel_version = 10;
string kernel_version = 11;
// CPU Stat.
CPU cpu = 11 [(validate.rules).message.required = true];
CPU cpu = 12 [(validate.rules).message.required = true];
// Memory Stat.
Memory memory = 12 [(validate.rules).message.required = true];
Memory memory = 13 [(validate.rules).message.required = true];
// Network Stat.
Network network = 13 [(validate.rules).message.required = true];
Network network = 14 [(validate.rules).message.required = true];
// Disk Stat.
Disk disk = 14 [(validate.rules).message.required = true];
Disk disk = 15 [(validate.rules).message.required = true];
// Build information.
Build build = 15 [(validate.rules).message.required = true];
Build build = 16 [(validate.rules).message.required = true];
}

// CPU Stat.
Expand Down
682 changes: 353 additions & 329 deletions pkg/apis/manager/v2/manager.pb.go

Large diffs are not rendered by default.

13 changes: 13 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.

18 changes: 11 additions & 7 deletions pkg/apis/manager/v2/manager.proto
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,18 @@ message SeedPeer {
string ip = 6;
// Seed peer grpc port.
int32 port = 7;
// Seed peer download port.
int32 download_port = 8;
// Seed peer state.
string state = 8;
string state = 9;
// ID of the cluster to which the seed peer belongs.
uint64 seed_peer_cluster_id = 9;
uint64 seed_peer_cluster_id = 10;
// Cluster to which the seed peer belongs.
SeedPeerCluster seed_peer_cluster = 10;
SeedPeerCluster seed_peer_cluster = 11;
// Schedulers included in seed peer.
repeated Scheduler schedulers = 11;
repeated Scheduler schedulers = 12;
// Seed peer object storage port.
int32 object_storage_port = 12;
int32 object_storage_port = 13;
}

// GetSeedPeerRequest represents request of GetSeedPeer.
Expand Down Expand Up @@ -102,10 +104,12 @@ message UpdateSeedPeerRequest {
string ip = 6 [(validate.rules).string = {ip: true}];
// Seed peer port.
int32 port = 7 [(validate.rules).int32 = {gte: 1024, lt: 65535}];
// Seed peer download port.
int32 download_port = 8 [(validate.rules).int32 = {gte: 1024, lt: 65535}];
// ID of the cluster to which the seed peer belongs.
uint64 seed_peer_cluster_id = 8 [(validate.rules).uint64 = {gte: 1}];
uint64 seed_peer_cluster_id = 9 [(validate.rules).uint64 = {gte: 1}];
// Seed peer object storage port.
int32 object_storage_port = 9 [(validate.rules).int32 = {gte: 1024, lt: 65535, ignore_empty: true}];
int32 object_storage_port = 10 [(validate.rules).int32 = {gte: 1024, lt: 65535, ignore_empty: true}];
}

// SeedPeerCluster represents cluster of scheduler.
Expand Down
22 changes: 12 additions & 10 deletions proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -178,26 +178,28 @@ message Host {
string ip = 4;
// Port of grpc service.
int32 port = 5;
// Port of download server.
int32 download_port = 6;
// Host OS.
string os = 6;
string os = 7;
// Host platform.
string platform = 7;
string platform = 8;
// Host platform family.
string platform_family = 8;
string platform_family = 9;
// Host platform version.
string platform_version = 9;
string platform_version = 10;
// Host kernel version.
string kernel_version = 10;
string kernel_version = 11;
// CPU Stat.
CPU cpu = 11;
CPU cpu = 12;
// Memory Stat.
Memory memory = 12;
Memory memory = 13;
// Network Stat.
Network network = 13;
Network network = 14;
// Disk Stat.
Disk disk = 14;
Disk disk = 15;
// Build information.
Build build = 15;
Build build = 16;
}

// CPU Stat.
Expand Down
18 changes: 11 additions & 7 deletions proto/manager.proto
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,18 @@ message SeedPeer {
string ip = 6;
// Seed peer grpc port.
int32 port = 7;
// Seed peer download port.
int32 download_port = 8;
// Seed peer state.
string state = 8;
string state = 9;
// ID of the cluster to which the seed peer belongs.
uint64 seed_peer_cluster_id = 9;
uint64 seed_peer_cluster_id = 10;
// Cluster to which the seed peer belongs.
SeedPeerCluster seed_peer_cluster = 10;
SeedPeerCluster seed_peer_cluster = 11;
// Schedulers included in seed peer.
repeated Scheduler schedulers = 11;
repeated Scheduler schedulers = 12;
// Seed peer object storage port.
int32 object_storage_port = 12;
int32 object_storage_port = 13;
}

// GetSeedPeerRequest represents request of GetSeedPeer.
Expand Down Expand Up @@ -99,10 +101,12 @@ message UpdateSeedPeerRequest {
string ip = 6;
// Seed peer port.
int32 port = 7;
// Seed peer download port.
int32 download_port = 8;
// ID of the cluster to which the seed peer belongs.
uint64 seed_peer_cluster_id = 8;
uint64 seed_peer_cluster_id = 9;
// Seed peer object storage port.
int32 object_storage_port = 9;
int32 object_storage_port = 10;
}

// SeedPeerCluster represents cluster of scheduler.
Expand Down
23 changes: 13 additions & 10 deletions src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,35 +117,38 @@ pub struct Host {
/// Port of grpc service.
#[prost(int32, tag = "5")]
pub port: i32,
/// Port of download server.
#[prost(int32, tag = "6")]
pub download_port: i32,
/// Host OS.
#[prost(string, tag = "6")]
#[prost(string, tag = "7")]
pub os: ::prost::alloc::string::String,
/// Host platform.
#[prost(string, tag = "7")]
#[prost(string, tag = "8")]
pub platform: ::prost::alloc::string::String,
/// Host platform family.
#[prost(string, tag = "8")]
#[prost(string, tag = "9")]
pub platform_family: ::prost::alloc::string::String,
/// Host platform version.
#[prost(string, tag = "9")]
#[prost(string, tag = "10")]
pub platform_version: ::prost::alloc::string::String,
/// Host kernel version.
#[prost(string, tag = "10")]
#[prost(string, tag = "11")]
pub kernel_version: ::prost::alloc::string::String,
/// CPU Stat.
#[prost(message, optional, tag = "11")]
#[prost(message, optional, tag = "12")]
pub cpu: ::core::option::Option<Cpu>,
/// Memory Stat.
#[prost(message, optional, tag = "12")]
#[prost(message, optional, tag = "13")]
pub memory: ::core::option::Option<Memory>,
/// Network Stat.
#[prost(message, optional, tag = "13")]
#[prost(message, optional, tag = "14")]
pub network: ::core::option::Option<Network>,
/// Disk Stat.
#[prost(message, optional, tag = "14")]
#[prost(message, optional, tag = "15")]
pub disk: ::core::option::Option<Disk>,
/// Build information.
#[prost(message, optional, tag = "15")]
#[prost(message, optional, tag = "16")]
pub build: ::core::option::Option<Build>,
}
/// CPU Stat.
Expand Down
Binary file modified src/descriptor.bin
Binary file not shown.
20 changes: 13 additions & 7 deletions src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,23 @@ pub struct SeedPeer {
/// Seed peer grpc port.
#[prost(int32, tag = "7")]
pub port: i32,
/// Seed peer download port.
#[prost(int32, tag = "8")]
pub download_port: i32,
/// Seed peer state.
#[prost(string, tag = "8")]
#[prost(string, tag = "9")]
pub state: ::prost::alloc::string::String,
/// ID of the cluster to which the seed peer belongs.
#[prost(uint64, tag = "9")]
#[prost(uint64, tag = "10")]
pub seed_peer_cluster_id: u64,
/// Cluster to which the seed peer belongs.
#[prost(message, optional, tag = "10")]
#[prost(message, optional, tag = "11")]
pub seed_peer_cluster: ::core::option::Option<SeedPeerCluster>,
/// Schedulers included in seed peer.
#[prost(message, repeated, tag = "11")]
#[prost(message, repeated, tag = "12")]
pub schedulers: ::prost::alloc::vec::Vec<Scheduler>,
/// Seed peer object storage port.
#[prost(int32, tag = "12")]
#[prost(int32, tag = "13")]
pub object_storage_port: i32,
}
/// GetSeedPeerRequest represents request of GetSeedPeer.
Expand Down Expand Up @@ -98,11 +101,14 @@ pub struct UpdateSeedPeerRequest {
/// Seed peer port.
#[prost(int32, tag = "7")]
pub port: i32,
/// Seed peer download port.
#[prost(int32, tag = "8")]
pub download_port: i32,
/// ID of the cluster to which the seed peer belongs.
#[prost(uint64, tag = "8")]
#[prost(uint64, tag = "9")]
pub seed_peer_cluster_id: u64,
/// Seed peer object storage port.
#[prost(int32, tag = "9")]
#[prost(int32, tag = "10")]
pub object_storage_port: i32,
}
/// SeedPeerCluster represents cluster of scheduler.
Expand Down
Loading