MCPcopy Create free account
hub / github.com/ermak-dev/cloudpub / Plugin

Interface Plugin

client/src/plugins/plugin_trait.rs:17–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15
16#[async_trait]
17pub trait Plugin: Send + Sync {
18 /// Name of the plugin
19 fn name(&self) -> &'static str;
20
21 /// Setup the plugin environment
22 async fn setup(
23 &self,
24 config: &Arc<RwLock<ClientConfig>>,
25 opts: &ClientOpts,
26 command_rx: &mut mpsc::Receiver<Message>,
27 result_tx: &mpsc::Sender<Message>,
28 ) -> Result<()>;
29
30 /// Publish a service using this plugin
31 async fn publish(
32 &self,
33 endpoint: &ServerEndpoint,
34 config: &Arc<RwLock<ClientConfig>>,
35 opts: &ClientOpts,
36 result_tx: &mpsc::Sender<Message>,
37 ) -> Result<SubProcess>;
38}
39
40pub struct PluginHandle {
41 guid: String,

Callers

nothing calls this directly

Implementers 3

mod.rsclient/src/plugins/webdav/mod.rs
mod.rsclient/src/plugins/onec/mod.rs
mod.rsclient/src/plugins/minecraft/mod.rs

Calls

no outgoing calls

Tested by

no test coverage detected