Skip to content

Commit

Permalink
feat: rename types
Browse files Browse the repository at this point in the history
Signed-off-by: David Dal Busco <[email protected]>
  • Loading branch information
peterpeterparker committed Dec 15, 2023
1 parent 0cec28e commit 42c258d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/satellite/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ use crate::storage::types::http_request::{
Routing, RoutingDefault, RoutingRedirect, RoutingRewrite,
};
use crate::storage::types::interface::{
AssetNoContent, CommitBatch, InitAssetKey, InitUploadResult, UploadChunk, UploadChunkResult, Memory as MemoryInterface
AssetNoContent, CommitBatch, InitAssetKey, InitUploadResult, MemorySize, UploadChunk,
UploadChunkResult,
};
use crate::types::core::{CollectionKey, Key};
use crate::types::interface::{Config, RulesType};
Expand Down Expand Up @@ -511,8 +512,8 @@ fn version() -> String {
}

#[query(guard = "caller_is_admin_controller")]
fn memory() -> MemoryInterface {
MemoryInterface {
fn memory() -> MemorySize {
MemorySize {
heap: memory_size(0) * WASM_PAGE_SIZE_IN_BYTES,
stable: stable_size() as usize * WASM_PAGE_SIZE_IN_BYTES,
}
Expand Down
2 changes: 1 addition & 1 deletion src/satellite/src/storage/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ pub mod interface {
pub type Bytes = usize;

#[derive(CandidType, Deserialize, Clone)]
pub struct Memory {
pub struct MemorySize {
pub heap: Bytes,
pub stable: Bytes,
}
Expand Down

0 comments on commit 42c258d

Please sign in to comment.