Struct collectd_plugin::ValueListBuilder
[−]
[src]
pub struct ValueListBuilder<'a> { /* fields omitted */ }
Creates a value list to report values to collectd.
Methods
impl<'a> ValueListBuilder<'a>
[src]
pub fn new<T: Into<&'a str>, U: Into<&'a str>>(
plugin: T,
type_: U
) -> ValueListBuilder<'a>
[src]
plugin: T,
type_: U
) -> ValueListBuilder<'a>
Primes a value list for submission. plugin
will most likely be the name from the
PluginManager
and type_
is the datatype found in types.db
pub fn values(self, values: &'a [Value]) -> ValueListBuilder<'a>
[src]
A set of observed values that belong to the same plugin and type instance
pub fn plugin_instance<T: Into<&'a str>>(
self,
plugin_instance: T
) -> ValueListBuilder<'a>
[src]
self,
plugin_instance: T
) -> ValueListBuilder<'a>
Distinguishes entities that yield metrics. Each core would be a different instance of the same plugin, as each core reports "idle", "user", "system" metrics.
pub fn type_instance<T: Into<&'a str>>(
self,
type_instance: T
) -> ValueListBuilder<'a>
[src]
self,
type_instance: T
) -> ValueListBuilder<'a>
The type instance is used to separate values of identical type which nonetheless belong to one another. For instance, even though "free", "used", and "total" all have types of "Memory" they are different type instances.
pub fn host<T: Into<&'a str>>(self, host: T) -> ValueListBuilder<'a>
[src]
Override the machine's hostname that the observed values will be attributed to. Best to override when observing values from another machine
pub fn time(self, dt: DateTime<Utc>) -> ValueListBuilder<'a>
[src]
The timestamp at which the value was collected. Overrides the default time, which is when
collectd receives the values from submit
. Use only if there is a significant delay is
metrics gathering or if submitting values from the past.
pub fn interval(self, interval: Duration) -> ValueListBuilder<'a>
[src]
The interval in which new values are to be expected. This is typically handled at a global or plugin level. Use at your own discretion.
pub fn submit(self) -> Result<(), Error>
[src]
Submits the observed values to collectd and returns errors if encountered
Trait Implementations
impl<'a> Debug for ValueListBuilder<'a>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'a> PartialEq for ValueListBuilder<'a>
[src]
fn eq(&self, __arg_0: &ValueListBuilder<'a>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ValueListBuilder<'a>) -> bool
[src]
This method tests for !=
.
impl<'a> Clone for ValueListBuilder<'a>
[src]
fn clone(&self) -> ValueListBuilder<'a>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more