pub struct DemoSource { /* private fields */ }Expand description
A DataSource with made-up readings that change over time.
Implementations§
Trait Implementations§
Source§impl Clone for DemoSource
impl Clone for DemoSource
Source§impl DataSource for DemoSource
impl DataSource for DemoSource
Source§fn signal_process(
&mut self,
_pid: u32,
_signal: ProcessSignal,
) -> Result<(), SourceError>
fn signal_process( &mut self, _pid: u32, _signal: ProcessSignal, ) -> Result<(), SourceError>
Sends
signal to process pid on the monitored host, with the
privileges of the user the source runs as.Source§fn watch_processes(&mut self, pids: Vec<u32>)
fn watch_processes(&mut self, pids: Vec<u32>)
Processes to always include in snapshots, whatever the process
limit, and to list in
Snapshot::watched_pids, so that the client
can tell when they exit. Replaces the previous list.Source§fn set_public_ip(&mut self, lookup: Option<PublicIpLookup>)
fn set_public_ip(&mut self, lookup: Option<PublicIpLookup>)
Looks up the host’s public address as
lookup says (None: not
at all, the default) and reports it in Snapshot::public_ip.
Remote sources ask the agent, so each host reports its own.Source§fn set_interval(&mut self, _interval: Duration)
fn set_interval(&mut self, _interval: Duration)
Tells the source how often it will be polled. Remote sources forward
this to the agent, which samples on its own schedule; local sources
need nothing.
Source§fn set_process_limit(&mut self, _limit: Option<usize>)
fn set_process_limit(&mut self, _limit: Option<usize>)
Limits snapshots to the top
limit processes by CPU (None: all).
Remote sources use this to save bandwidth for hosts in an overview.Source§fn watch_process_names(&mut self, _names: Vec<String>)
fn watch_process_names(&mut self, _names: Vec<String>)
Like
DataSource::watch_processes for every process matching one
of names (see crate::view::process_matches) while it runs, and
in the snapshot after it exited, so that the client sees it go.
Replaces the previous list.Auto Trait Implementations§
impl Freeze for DemoSource
impl RefUnwindSafe for DemoSource
impl Send for DemoSource
impl Sync for DemoSource
impl Unpin for DemoSource
impl UnsafeUnpin for DemoSource
impl UnwindSafe for DemoSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more