pub struct MetricsReaderBuilder<'a> { /* private fields */ }
Expand description
Initialize and configure a MetricsReader
but do not attach it to a running varnishd
instance
Implementations§
Source§impl<'a> MetricsReaderBuilder<'a>
impl<'a> MetricsReaderBuilder<'a>
Sourcepub fn work_dir(self, dir: &Path) -> Result<Self, NulError>
pub fn work_dir(self, dir: &Path) -> Result<Self, NulError>
Specify where to find the varnishd
working directory.
It’s usually superfluous to call this function, unless varnishd
itself was called with
the -n
argument (in which case, both arguments should match)
Sourcepub fn patience(self, t: Option<Duration>) -> Self
pub fn patience(self, t: Option<Duration>) -> Self
How long to wait when attaching
When MetricsReaderBuilder::build()
is called, it’ll internally call VSM_Attach
, hoping to find a running
varnishd
instance. If None
, the function will not return until it connects, otherwise
it specifies the timeout to use.
Sourcepub fn include(self, s: &str) -> Result<Self, NulError>
pub fn include(self, s: &str) -> Result<Self, NulError>
Provide a globbing pattern of statistics names to include.
May be called multiple times, interleaved with MetricsReaderBuilder::exclude()
, the order matters.
Sourcepub fn exclude(self, s: &str) -> Result<Self, NulError>
pub fn exclude(self, s: &str) -> Result<Self, NulError>
Provide a globbing pattern of statistics names to exclude.
May be called multiple times, interleaved with MetricsReaderBuilder::include()
, the order matters.
Sourcepub fn require(self, s: &str) -> Result<Self, NulError>
pub fn require(self, s: &str) -> Result<Self, NulError>
Provide a globbing pattern of statistics names to keep around, protecting them from exclusion.
Sourcepub fn build(self) -> VclResult<MetricsReader<'a>>
pub fn build(self) -> VclResult<MetricsReader<'a>>
Build the MetricsReader
, attaching to a running varnishd
instance