pub trait DynPlugin: Send + Sync {
// Required methods
fn info(&self) -> &PluginInfo;
fn state(&self) -> PluginState;
fn init(&mut self) -> BoxFuture<'_, Result<(), IronpostError>>;
fn start(&mut self) -> BoxFuture<'_, Result<(), IronpostError>>;
fn stop(&mut self) -> BoxFuture<'_, Result<(), IronpostError>>;
fn health_check(&self) -> BoxFuture<'_, HealthStatus>;
}Expand description
dyn-compatible 플러그인 trait
Plugin trait은 RPITIT를 사용하므로 dyn Plugin이 불가합니다.
DynPlugin은 BoxFuture를 반환하여 Vec<Box<dyn DynPlugin>>으로
플러그인을 동적 관리할 수 있게 합니다.
Required Methods§
Sourcefn info(&self) -> &PluginInfo
fn info(&self) -> &PluginInfo
플러그인 메타데이터를 반환합니다.
Sourcefn state(&self) -> PluginState
fn state(&self) -> PluginState
현재 플러그인 상태를 반환합니다.
Sourcefn health_check(&self) -> BoxFuture<'_, HealthStatus>
fn health_check(&self) -> BoxFuture<'_, HealthStatus>
플러그인의 건강 상태를 확인합니다.