Struct kvarn::ctl::Plugins

source ·
pub struct Plugins { /* private fields */ }
Available on crate feature handover only.
Expand description

The plugins this Kvarn instance supports.

All plugins added by RunConfig::add_plugin are available to Plugins in runtime.

§Defaults

More info can be found at kvarn.org.

§shutdown

If the feature graceful-shutdown is enabled, a plugin with the name shutdown is added. It’s functionality can be changed by adding a new plugin with the same name.

§ping

The ping plugin sends back all the args we received.

§reload

Starts a new instance of Kvarn which takes control. Requires a shutdown plugin to be present and handover support.

If handover isn’t supported, there will be a few milliseconds where no one’s listening on the port.

§wait

Waits for the Kvarn instance to shut down.

§clear

Format: kvarnctl clear <method> (<host> <file/URI>)

Clears caches. Methods available are all, files, responses, and two which clear a specific resource, file and response.

Implementations§

source§

impl Plugins

source

pub fn contains_plugin(&self, name: impl AsRef<str>) -> bool

Check if plugin with name is present. This mea