Skip to main content

PluginSession

Struct PluginSession 

Source
pub struct PluginSession { /* private fields */ }

Implementations§

Source§

impl PluginSession

Source

pub async fn start( command: PluginCommand, expected_provider_kind: &str, provider_instance: &str, startup_timeout: Duration, request_timeout: Duration, ) -> Result<Self, PluginError>

Source

pub async fn linked( provider: Arc<dyn Provider>, expected_provider_kind: &str, provider_instance: &str, request_timeout: Duration, ) -> Result<Self, PluginError>

Source

pub fn run_dir(&self) -> &Path

Source

pub fn provider_version(&self) -> &str

Source

pub fn capabilities(&self) -> &BTreeSet<String>

Source

pub fn resource_kinds(&self) -> &[ResourceKindDescriptor]

Advertised provider-owned resource kind schemas from handshake.

Source

pub async fn observe( &mut self, provider_config_json: Vec<u8>, selection_json: Vec<u8>, secrets: HashMap<String, Vec<u8>>, ) -> Result<Vec<u8>, PluginError>

Source

pub async fn capture( &mut self, provider_config_json: Vec<u8>, resource_ids: Vec<String>, secrets: HashMap<String, Vec<u8>>, ) -> Result<Vec<CaptureArtifact>, PluginError>

Source

pub async fn plan( &mut self, desired_json: Vec<u8>, observations_json: Vec<u8>, secrets: HashMap<String, Vec<u8>>, ) -> Result<Vec<PlannedAction>, PluginError>

Source

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>

Source

pub async fn apply( &mut self, action: PlannedAction, secrets: HashMap<String, Vec<u8>>, run_id: &str, ) -> Result<Vec<ApplyResponse>, PluginError>

Source

pub async fn apply_with_progress( &mut self, action: PlannedAction, secrets: HashMap<String, Vec<u8>>, run_id: &str, logger: Logger, ) -> Result<Vec<ApplyResponse>, PluginError>

Source

pub async fn verify( &mut self, action: PlannedAction, secrets: HashMap<String, Vec<u8>>, ) -> Result<(), PluginError>

Source

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>

Source

pub async fn cancel(&mut self, run_id: &str) -> Result<(), PluginError>

Trait Implementations§

Source§

impl Drop for PluginSession

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

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].
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,