pub struct Resource {
pub resource: Option<Struct>,
pub connection_details: HashMap<String, Vec<u8>>,
pub ready: i32,
}Expand description
A Resource represents the state of a Kubernetes resource.
Fields§
§resource: Option<Struct>The JSON representation of the resource.
-
Crossplane will set this field in a RunFunctionRequest to the entire observed state of a resource - including its metadata, spec, and status.
-
A function should set this field in a RunFunctionRequest to communicate the desired state of the resource.
-
A function may only specify the desired status of a XR - not its metadata or spec. A function should not return desired metadata or spec for a XR. This will be ignored.
-
A function may not specify the desired status of any other resource - e.g. composed resources. It may only specify their metadata and spec. Status will be ignored.
connection_details: HashMap<String, Vec<u8>>The resource’s connection details.
-
Crossplane will set this field in a RunFunctionRequest to communicate the the observed connection details of a composite or composed resource.
-
A function should set this field in a RunFunctionResponse to indicate the desired connection details of legacy XRs. For modern XRs, this will be ignored.
-
A function should not set this field in a RunFunctionResponse to indicate the desired connection details of a composed resource. This will be ignored.
Connection details are only used for composition. They’re ignored by Operations.
ready: i32Ready indicates whether the resource should be considered ready.
-
Crossplane will never set this field in a RunFunctionRequest.
-
A function should set this field to READY_TRUE in a RunFunctionResponse to indicate that a desired resource is ready.
-
A function should set this field to READY_TRUE in a RunFunctionResponse to indicate that a desired XR is ready. This overwrites the standard readiness detection that determines the ready state of the composite by the ready state of the composed resources.
Ready is only used for composition. It’s ignored by Operations.
Implementations§
Trait Implementations§
§impl<'de> Deserialize<'de> for Resource
impl<'de> Deserialize<'de> for Resource
§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl Message for Resource
impl Message for Resource
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.impl StructuralPartialEq for Resource
Auto Trait Implementations§
impl Freeze for Resource
impl RefUnwindSafe for Resource
impl Send for Resource
impl Sync for Resource
impl Unpin for Resource
impl UnsafeUnpin for Resource
impl UnwindSafe for Resource
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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