1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! # `folk-api`
//!
//! Plugin contract for Folk: every plugin in Folk depends on this crate
//! and **only** on this crate. The server core (`folk-core`) provides the
//! concrete implementations of [`Executor`], [`RpcRegistrar`],
//! [`HealthRegistry`], and [`MetricsRegistry`].
//!
//! ## Writing a plugin
//!
//! Most plugins should:
//!
//! 1. Implement [`ServerPlugin`] (not [`Plugin`] directly) for a long-running
//! background task.
//! 2. Wrap the implementation in [`ServerPluginWrapper`].
//! 3. Implement [`PluginFactory`] to construct the plugin from config.
//! 4. Export `pub fn folk_plugin_factory() -> Box<dyn PluginFactory>`.
//!
//! See `folk-spec/adr/0006-plugin-api-shape.md` for the full design rationale,
//! and `folk-plugin-http` for a complete working example (phase 6).
pub use PluginContext;
pub use Executor;
pub use PluginFactory;
pub use ;
pub use ;
pub use Plugin;
pub use ;
pub use ;
/// The Folk API version. Equals this crate's `Cargo.toml` `version` field.
///
/// Used for diagnostics and the `folk --version` output. There is no runtime
/// version negotiation; see `folk-spec/adr/0004-no-capability-negotiation.md`.
pub const FOLK_API_VERSION: &str = env!;