pub struct PluginSession { /* private fields */ }Implementations§
Source§impl PluginSession
impl PluginSession
pub async fn start( command: PluginCommand, expected_provider_kind: &str, provider_instance: &str, startup_timeout: Duration, request_timeout: Duration, ) -> Result<Self, PluginError>
pub async fn linked( provider: Arc<dyn Provider>, expected_provider_kind: &str, provider_instance: &str, request_timeout: Duration, ) -> Result<Self, PluginError>
pub fn run_dir(&self) -> &Path
pub fn provider_version(&self) -> &str
pub fn capabilities(&self) -> &BTreeSet<String>
Sourcepub fn resource_kinds(&self) -> &[ResourceKindDescriptor]
pub fn resource_kinds(&self) -> &[ResourceKindDescriptor]
Advertised provider-owned resource kind schemas from handshake.
pub async fn observe( &mut self, provider_config_json: Vec<u8>, selection_json: Vec<u8>, secrets: HashMap<String, Vec<u8>>, ) -> Result<Vec<u8>, PluginError>
pub async fn capture( &mut self, provider_config_json: Vec<u8>, resource_ids: Vec<String>, secrets: HashMap<String, Vec<u8>>, ) -> Result<Vec<CaptureArtifact>, PluginError>
pub async fn plan( &mut self, desired_json: Vec<u8>, observations_json: Vec<u8>, secrets: HashMap<String, Vec<u8>>, ) -> Result<Vec<PlannedAction>, PluginError>
pub async fn plan_with_context( &mut self, desired_json: Vec<u8>, observations_json: Vec<u8>, secrets: HashMap<String, Vec<u8>>, resource_contexts: HashMap<String, ResourcePlanContext>, enrollment_strategy: EnrollmentStrategy, planning_mode: PlanningMode, ) -> Result<Vec<PlannedAction>, PluginError>
pub async fn apply( &mut self, action: PlannedAction, secrets: HashMap<String, Vec<u8>>, run_id: &str, ) -> Result<Vec<ApplyResponse>, PluginError>
pub async fn apply_with_progress( &mut self, action: PlannedAction, secrets: HashMap<String, Vec<u8>>, run_id: &str, logger: Logger, ) -> Result<Vec<ApplyResponse>, PluginError>
pub async fn verify( &mut self, action: PlannedAction, secrets: HashMap<String, Vec<u8>>, ) -> Result<(), PluginError>
pub async fn verify_with_outputs( &mut self, action: PlannedAction, secrets: HashMap<String, Vec<u8>>, confidential_outputs: HashMap<String, Vec<u8>>, public_outputs: HashMap<String, Vec<u8>>, ) -> Result<(), PluginError>
pub async fn cancel(&mut self, run_id: &str) -> Result<(), PluginError>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PluginSession
impl !RefUnwindSafe for PluginSession
impl Send for PluginSession
impl Sync for PluginSession
impl Unpin for PluginSession
impl UnsafeUnpin for PluginSession
impl !UnwindSafe for PluginSession
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].