Skip to main content

RunFunctionRequest

Struct RunFunctionRequest 

Source
pub struct RunFunctionRequest {
    pub meta: Option<RequestMeta>,
    pub observed: Option<State>,
    pub desired: Option<State>,
    pub input: Option<Struct>,
    pub context: Option<Struct>,
    pub extra_resources: HashMap<String, Resources>,
    pub credentials: HashMap<String, Credentials>,
    pub required_resources: HashMap<String, Resources>,
    pub required_schemas: HashMap<String, Schema>,
}
Expand description

A RunFunctionRequest requests that the function be run.

Fields§

§meta: Option<RequestMeta>

Metadata pertaining to this request.

§observed: Option<State>

The observed state prior to invocation of a function pipeline. State passed to each function is fresh as of the time the pipeline was invoked, not as of the time each function was invoked.

§desired: Option<State>

Desired state according to a function pipeline. The state passed to a particular function may have been accumulated by previous functions in the pipeline.

Note that the desired state must be a partial object with only the fields that this function (and its predecessors in the pipeline) wants to have set in the object. Copying a non-partial observed state to desired is most likely not what you want to do. Leaving out fields that had been returned as desired before will result in them being deleted from the objects in the cluster.

§input: Option<Struct>

Optional input specific to this function invocation. A JSON representation of the ‘input’ block of the relevant entry in a function pipeline.

§context: Option<Struct>

Optional context. Crossplane may pass arbitrary contextual information to a function. A function may also return context in its RunFunctionResponse, and that context will be passed to subsequent functions. Crossplane discards all context returned by the last function in the pipeline.

§extra_resources: HashMap<String, Resources>

Optional resources that the function specified in its requirements. Note that resources is a map to Resources, plural. The map key corresponds to the key in a RunFunctionResponse’s requirements.extra_resources field. If a function requested extra resources that did not exist, Crossplane sets the map key to an empty Resources message to indicate that it attempted to satisfy the request. This field is only populated when the function uses extra_resources in its requirements.

Deprecated: Use required_resources instead.

§credentials: HashMap<String, Credentials>

Optional credentials that this function may use to communicate with an external system.

§required_resources: HashMap<String, Resources>

Optional resources that the function specified in its requirements. Note that resources is a map to Resources, plural. The map key corresponds to the key in a RunFunctionResponse’s requirements.resources field. If a function requested required resources that did not exist, Crossplane sets the map key to an empty Resources message to indicate that it attempted to satisfy the request. This field is only populated when the function uses resources in its requirements.

§required_schemas: HashMap<String, Schema>

Optional schemas that the function specified in its requirements. The map key corresponds to the key in a RunFunctionResponse’s requirements.schemas field. If a function requested a schema that could not be found, Crossplane sets the map key to an empty Schema message to indicate that it attempted to satisfy the request.

Trait Implementations§

Source§

impl Clone for RunFunctionRequest

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RunFunctionRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RunFunctionRequest

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
§

impl<'de> Deserialize<'de> for RunFunctionRequest

§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Message for RunFunctionRequest

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8> ⓘ
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘ
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for RunFunctionRequest

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
§

impl Serialize for RunFunctionRequest

§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for RunFunctionRequest

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

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

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

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.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

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

impl<L> LayerExt<L> for L

Source§

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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