Compare commits
	
		
			2 Commits
		
	
	
		
			6d37792640
			...
			90192d7231
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 90192d7231 | |||
| 01e93d3a2e | 
							
								
								
									
										3
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										3
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							| @ -1,7 +1,6 @@ | |||||||
| # SPDX-License-Identifier: Apache-2.0 |  | ||||||
| 
 |  | ||||||
| # This file is automatically @generated by Cargo. | # This file is automatically @generated by Cargo. | ||||||
| # It is not intended for manual editing. | # It is not intended for manual editing. | ||||||
|  | # SPDX-License-Identifier: Apache-2.0 | ||||||
| version = 4 | version = 4 | ||||||
| 
 | 
 | ||||||
| [[package]] | [[package]] | ||||||
|  | |||||||
| @ -38,8 +38,8 @@ message NewAppReq { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| message AppResource { | message AppResource { | ||||||
|   uint32 memory_mb = 1; |   uint32 memory_mib = 1; | ||||||
|   uint32 disk_size_gb = 2; |   uint32 disk_size_mib = 2; | ||||||
|   uint32 vcpus  = 3; |   uint32 vcpus  = 3; | ||||||
|   repeated uint32 ports = 4; |   repeated uint32 ports = 4; | ||||||
| } | } | ||||||
| @ -66,8 +66,8 @@ message ListAppContractsReq { | |||||||
| 
 | 
 | ||||||
| message AppNodeFilters { | message AppNodeFilters { | ||||||
|   uint32 vcpus = 1; |   uint32 vcpus = 1; | ||||||
|   uint32 memory_mb = 2; |   uint32 memory_mib = 2; | ||||||
|   uint32 storage_gb = 3; |   uint32 storage_mib = 3; | ||||||
|   string country = 4; |   string country = 4; | ||||||
|   string region = 5; |   string region = 5; | ||||||
|   string city = 6; |   string city = 6; | ||||||
| @ -83,8 +83,11 @@ message AppNodeListResp { | |||||||
|   string region = 4; |   string region = 4; | ||||||
|   string city = 5; |   string city = 5; | ||||||
|   string ip = 6; // required for latency test |   string ip = 6; // required for latency test | ||||||
|   uint64 price = 7; // nanocredits per unit per minute |   repeated string reports = 7; // TODO: this will become an enum | ||||||
|   repeated string reports = 8; // TODO: this will become an enum |   uint64 price = 8; // nanocredits per unit per minute | ||||||
|  |   uint64 vcpus = 9; | ||||||
|  |   uint64 memory_mib = 10; | ||||||
|  |   uint64 disk_mib = 11; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| service BrainAppCli { | service BrainAppCli { | ||||||
| @ -112,8 +115,8 @@ message AppNodeResources { | |||||||
|   string node_pubkey = 1; |   string node_pubkey = 1; | ||||||
|   uint32 avail_no_of_port = 2; |   uint32 avail_no_of_port = 2; | ||||||
|   uint32 avail_vcpus = 3; |   uint32 avail_vcpus = 3; | ||||||
|   uint32 avail_memory_mb = 4; |   uint32 avail_memory_mib = 4; | ||||||
|   uint32 avail_storage_gb = 5; |   uint32 avail_storage_mib = 5; | ||||||
|   uint32 max_ports_per_app = 6; |   uint32 max_ports_per_app = 6; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -7,8 +7,8 @@ use serde::{Deserialize, Serialize}; | |||||||
| 
 | 
 | ||||||
| #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)] | #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)] | ||||||
| pub struct Resource { | pub struct Resource { | ||||||
|     pub memory_mb: u32, |     pub memory_mib: u32, | ||||||
|     pub disk_size_gb: u32, |     pub disk_size_mib: u32, | ||||||
|     pub vcpus: u32, |     pub vcpus: u32, | ||||||
|     pub port: Vec<u32>, |     pub port: Vec<u32>, | ||||||
| } | } | ||||||
| @ -16,8 +16,8 @@ pub struct Resource { | |||||||
| impl From<AppResource> for Resource { | impl From<AppResource> for Resource { | ||||||
|     fn from(pb_val: AppResource) -> Self { |     fn from(pb_val: AppResource) -> Self { | ||||||
|         Self { |         Self { | ||||||
|             memory_mb: pb_val.memory_mb, |             memory_mib: pb_val.memory_mib, | ||||||
|             disk_size_gb: pb_val.disk_size_gb, |             disk_size_mib: pb_val.disk_size_mib, | ||||||
|             vcpus: pb_val.vcpus, |             vcpus: pb_val.vcpus, | ||||||
|             port: pb_val.ports, |             port: pb_val.ports, | ||||||
|         } |         } | ||||||
| @ -26,8 +26,8 @@ impl From<AppResource> for Resource { | |||||||
| impl From<Resource> for AppResource { | impl From<Resource> for AppResource { | ||||||
|     fn from(val: Resource) -> AppResource { |     fn from(val: Resource) -> AppResource { | ||||||
|         AppResource { |         AppResource { | ||||||
|             memory_mb: val.memory_mb, |             memory_mib: val.memory_mib, | ||||||
|             disk_size_gb: val.disk_size_gb, |             disk_size_mib: val.disk_size_mib, | ||||||
|             vcpus: val.vcpus, |             vcpus: val.vcpus, | ||||||
|             ports: val.port, |             ports: val.port, | ||||||
|         } |         } | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user