pub struct NodeService { /* private fields */ }Expand description
CSI NodeService implementation.
Implementations§
Source§impl NodeService
impl NodeService
Sourcepub const DEFAULT_MAX_VOLUMES: usize = 128usize
pub const DEFAULT_MAX_VOLUMES: usize = 128usize
Default maximum volumes per node.
Sourcepub fn node_stage_volume(
&mut self,
volume_id: u64,
staging_target: String,
device_path: String,
fs_type: String,
mount_options: Vec<String>,
) -> Result<(), NodeError>
pub fn node_stage_volume( &mut self, volume_id: u64, staging_target: String, device_path: String, fs_type: String, mount_options: Vec<String>, ) -> Result<(), NodeError>
Stage a volume on this node (make the device available).
Sourcepub fn node_unstage_volume(&mut self, volume_id: u64) -> Result<(), NodeError>
pub fn node_unstage_volume(&mut self, volume_id: u64) -> Result<(), NodeError>
Unstage a volume (unmount from staging).
Sourcepub fn node_publish_volume(
&mut self,
volume_id: u64,
target_path: String,
read_only: bool,
) -> Result<(), NodeError>
pub fn node_publish_volume( &mut self, volume_id: u64, target_path: String, read_only: bool, ) -> Result<(), NodeError>
Publish a volume into a container path (bind mount from staging).
Sourcepub fn node_unpublish_volume(
&mut self,
volume_id: u64,
target_path: String,
) -> Result<(), NodeError>
pub fn node_unpublish_volume( &mut self, volume_id: u64, target_path: String, ) -> Result<(), NodeError>
Unpublish a volume from a container path.
Sourcepub fn list_staged(&self) -> Vec<&StagedVolume>
pub fn list_staged(&self) -> Vec<&StagedVolume>
List staged volumes.
Sourcepub fn list_published(&self) -> Vec<&PublishedVolume>
pub fn list_published(&self) -> Vec<&PublishedVolume>
List published volumes.
Sourcepub fn get_staged(&self, volume_id: u64) -> Option<&StagedVolume>
pub fn get_staged(&self, volume_id: u64) -> Option<&StagedVolume>
Get staged volume info.
Sourcepub fn staged_count(&self) -> usize
pub fn staged_count(&self) -> usize
Get the number of staged volumes.
Sourcepub fn published_count(&self) -> usize
pub fn published_count(&self) -> usize
Get the number of published volumes.
Sourcepub fn can_accept_volume(&self) -> bool
pub fn can_accept_volume(&self) -> bool
Check if this node can accept more volumes.