MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / resolve_runtime_layout_kind

Function resolve_runtime_layout_kind

src/pglite/base.rs:1756–1777  ·  view source on GitHub ↗
(
    paths: &PglitePaths,
    policy: RuntimeLayoutPolicy,
)

Source from the content-addressed store, hash-verified

1754}
1755
1756fn resolve_runtime_layout_kind(
1757 paths: &PglitePaths,
1758 policy: RuntimeLayoutPolicy,
1759) -> Result<RuntimeLayoutKind> {
1760 match policy {
1761 RuntimeLayoutPolicy::FullLocal => return Ok(RuntimeLayoutKind::FullLocal),
1762 RuntimeLayoutPolicy::Auto => {}
1763 }
1764
1765 if let Some(manifest) = read_runtime_layout_manifest(&paths.runtime_root())?
1766 && manifest.kind == RuntimeLayoutKind::SharedRuntimeOverlay
1767 {
1768 return Ok(RuntimeLayoutKind::SharedRuntimeOverlay);
1769 }
1770 if paths.runtime_root().join(MOUNTFS_RUNTIME_MARKER).is_file() {
1771 return Ok(RuntimeLayoutKind::SharedRuntimeOverlay);
1772 }
1773 if shared_runtime_overlay_enabled() {
1774 return Ok(RuntimeLayoutKind::SharedRuntimeOverlay);
1775 }
1776 Ok(RuntimeLayoutKind::FullLocal)
1777}
1778
1779fn write_runtime_layout_manifest(
1780 runtime_root: &Path,

Callers 1

prepare_runtime_layoutFunction · 0.85

Calls 4

runtime_rootMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected