pub struct ProviderClient<T> { /* private fields */ }Implementations§
Source§impl ProviderClient<Channel>
impl ProviderClient<Channel>
Source§impl<T> ProviderClient<T>where
T: GrpcService<Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> ProviderClient<T>where
T: GrpcService<Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ProviderClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<Body>, Response = Response<<T as GrpcService<Body>>::ResponseBody>>,
<T as Service<Request<Body>>>::Error: Into<StdError> + Send + Sync,
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
Sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
Sourcepub async fn get_metadata(
&mut self,
request: impl IntoRequest<Request>,
) -> Result<Response<Response>, Status>
pub async fn get_metadata( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
GetMetadata returns upfront information about server capabilities and supported resource types without requiring the server to instantiate all schema information, which may be memory intensive. This method is CURRENTLY UNUSED and it serves mostly for convenience of code generation inside of terraform-plugin-mux.
Sourcepub async fn get_provider_schema(
&mut self,
request: impl IntoRequest<Request>,
) -> Result<Response<Response>, Status>
pub async fn get_provider_schema( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
GetSchema returns schema information for the provider, data resources, and managed resources.
pub async fn validate_provider_config( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
pub async fn validate_resource_config( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
pub async fn validate_data_resource_config( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
pub async fn upgrade_resource_state( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
Sourcepub async fn get_resource_identity_schemas(
&mut self,
request: impl IntoRequest<Request>,
) -> Result<Response<Response>, Status>
pub async fn get_resource_identity_schemas( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
GetResourceIdentitySchemas returns the identity schemas for all managed resources.
Sourcepub async fn upgrade_resource_identity(
&mut self,
request: impl IntoRequest<Request>,
) -> Result<Response<Response>, Status>
pub async fn upgrade_resource_identity( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
UpgradeResourceIdentityData should return the upgraded resource identity data for a managed resource type.
Sourcepub async fn configure_provider(
&mut self,
request: impl IntoRequest<Request>,
) -> Result<Response<Response>, Status>
pub async fn configure_provider( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
////// One-time initialization, called before other functions below
Sourcepub async fn read_resource(
&mut self,
request: impl IntoRequest<Request>,
) -> Result<Response<Response>, Status>
pub async fn read_resource( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
////// Managed Resource Lifecycle
pub async fn plan_resource_change( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
pub async fn apply_resource_change( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
pub async fn import_resource_state( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
pub async fn move_resource_state( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
pub async fn read_data_source( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
pub async fn generate_resource_config( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
Sourcepub async fn validate_ephemeral_resource_config(
&mut self,
request: impl IntoRequest<Request>,
) -> Result<Response<Response>, Status>
pub async fn validate_ephemeral_resource_config( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
////// Ephemeral Resource Lifecycle
pub async fn open_ephemeral_resource( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
pub async fn renew_ephemeral_resource( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
pub async fn close_ephemeral_resource( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
Sourcepub async fn list_resource(
&mut self,
request: impl IntoRequest<Request>,
) -> Result<Response<Streaming<Event>>, Status>
pub async fn list_resource( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Streaming<Event>>, Status>
///// List
pub async fn validate_list_resource_config( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
Sourcepub async fn get_functions(
&mut self,
request: impl IntoRequest<Request>,
) -> Result<Response<Response>, Status>
pub async fn get_functions( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
GetFunctions returns the definitions of all functions.
Sourcepub async fn call_function(
&mut self,
request: impl IntoRequest<Request>,
) -> Result<Response<Response>, Status>
pub async fn call_function( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
////// Provider-contributed Functions
Sourcepub async fn validate_state_store_config(
&mut self,
request: impl IntoRequest<Request>,
) -> Result<Response<Response>, Status>
pub async fn validate_state_store_config( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
ValidateStateStoreConfig performs configuration validation
Sourcepub async fn configure_state_store(
&mut self,
request: impl IntoRequest<Request>,
) -> Result<Response<Response>, Status>
pub async fn configure_state_store( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
ConfigureStateStore configures the state store, such as S3 connection in the context of already configured provider
Sourcepub async fn read_state_bytes(
&mut self,
request: impl IntoRequest<Request>,
) -> Result<Response<Streaming<Response>>, Status>
pub async fn read_state_bytes( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Streaming<Response>>, Status>
ReadStateBytes streams byte chunks of a given state file from a state store
Sourcepub async fn write_state_bytes(
&mut self,
request: impl IntoStreamingRequest<Message = RequestChunk>,
) -> Result<Response<Response>, Status>
pub async fn write_state_bytes( &mut self, request: impl IntoStreamingRequest<Message = RequestChunk>, ) -> Result<Response<Response>, Status>
WriteStateBytes streams byte chunks of a given state file into a state store
Sourcepub async fn lock_state(
&mut self,
request: impl IntoRequest<Request>,
) -> Result<Response<Response>, Status>
pub async fn lock_state( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
LockState locks a given state (i.e. CE workspace)
Sourcepub async fn unlock_state(
&mut self,
request: impl IntoRequest<Request>,
) -> Result<Response<Response>, Status>
pub async fn unlock_state( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
UnlockState unlocks a given state (i.e. CE workspace)
Sourcepub async fn get_states(
&mut self,
request: impl IntoRequest<Request>,
) -> Result<Response<Response>, Status>
pub async fn get_states( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
GetStates returns a list of all states (i.e. CE workspaces) managed by a given state store
Sourcepub async fn delete_state(
&mut self,
request: impl IntoRequest<Request>,
) -> Result<Response<Response>, Status>
pub async fn delete_state( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
DeleteState instructs a given state store to delete a specific state (i.e. a CE workspace)
Sourcepub async fn plan_action(
&mut self,
request: impl IntoRequest<Request>,
) -> Result<Response<Response>, Status>
pub async fn plan_action( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
////// Actions
pub async fn invoke_action( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Streaming<Event>>, Status>
pub async fn validate_action_config( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
Sourcepub async fn stop_provider(
&mut self,
request: impl IntoRequest<Request>,
) -> Result<Response<Response>, Status>
pub async fn stop_provider( &mut self, request: impl IntoRequest<Request>, ) -> Result<Response<Response>, Status>
////// Graceful Shutdown
Trait Implementations§
Source§impl<T: Clone> Clone for ProviderClient<T>
impl<T: Clone> Clone for ProviderClient<T>
Source§fn clone(&self) -> ProviderClient<T>
fn clone(&self) -> ProviderClient<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for ProviderClient<T>
impl<T> RefUnwindSafe for ProviderClient<T>where
Grpc<T>: RefUnwindSafe,
impl<T> Send for ProviderClient<T>
impl<T> Sync for ProviderClient<T>
impl<T> Unpin for ProviderClient<T>
impl<T> UnsafeUnpin for ProviderClient<T>where
Grpc<T>: UnsafeUnpin,
impl<T> UnwindSafe for ProviderClient<T>where
Grpc<T>: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request