Documentation
¶
Overview ¶
Package request contains utilities for working with RunFunctionRequests.
Index ¶
- func AdvertisesCapabilities(req *v1.RunFunctionRequest) bool
- func GetContextKey(req *v1.RunFunctionRequest, key string) (*structpb.Value, bool)
- func GetCredentials(req *v1.RunFunctionRequest, name string) (resource.Credentials, error)
- func GetDesiredComposedResources(req *v1.RunFunctionRequest) (map[resource.Name]*resource.DesiredComposed, error)
- func GetDesiredCompositeResource(req *v1.RunFunctionRequest) (*resource.Composite, error)
- func GetExtraResources(req *v1.RunFunctionRequest) (map[string][]resource.Required, error)deprecated
- func GetInput(req *v1.RunFunctionRequest, into runtime.Object) error
- func GetObservedComposedResources(req *v1.RunFunctionRequest) (map[resource.Name]resource.ObservedComposed, error)
- func GetObservedCompositeResource(req *v1.RunFunctionRequest) (*resource.Composite, error)
- func GetRequiredResource(req *v1.RunFunctionRequest, name string) ([]resource.Required, bool, error)
- func GetRequiredResources(req *v1.RunFunctionRequest) (map[string][]resource.Required, error)
- func GetRequiredSchema(req *v1.RunFunctionRequest, name string) (schema *structpb.Struct, ok bool)
- func GetRequiredSchemas(req *v1.RunFunctionRequest) map[string]*structpb.Struct
- func HasCapability(req *v1.RunFunctionRequest, c v1.Capability) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdvertisesCapabilities ¶ added in v0.6.0
func AdvertisesCapabilities(req *v1.RunFunctionRequest) bool
AdvertisesCapabilities returns true if Crossplane advertises its capabilities in the request metadata. Crossplane v2.2 and later advertise capabilities. If this returns false, the calling Crossplane predates capability advertisement and HasCapability will always return false, even for features the older Crossplane does support.
func GetContextKey ¶
GetContextKey gets context from the supplied key.
func GetCredentials ¶ added in v0.3.0
func GetCredentials(req *v1.RunFunctionRequest, name string) (resource.Credentials, error)
GetCredentials from the supplied request.
func GetDesiredComposedResources ¶
func GetDesiredComposedResources(req *v1.RunFunctionRequest) (map[resource.Name]*resource.DesiredComposed, error)
GetDesiredComposedResources from the supplied request.
func GetDesiredCompositeResource ¶
func GetDesiredCompositeResource(req *v1.RunFunctionRequest) (*resource.Composite, error)
GetDesiredCompositeResource from the supplied request.
func GetExtraResources
deprecated
added in
v0.2.0
func GetInput ¶
func GetInput(req *v1.RunFunctionRequest, into runtime.Object) error
GetInput from the supplied request. Input is loaded into the supplied object.
func GetObservedComposedResources ¶
func GetObservedComposedResources(req *v1.RunFunctionRequest) (map[resource.Name]resource.ObservedComposed, error)
GetObservedComposedResources from the supplied request.
func GetObservedCompositeResource ¶
func GetObservedCompositeResource(req *v1.RunFunctionRequest) (*resource.Composite, error)
GetObservedCompositeResource from the supplied request.
func GetRequiredResource ¶ added in v0.6.0
func GetRequiredResource(req *v1.RunFunctionRequest, name string) ([]resource.Required, bool, error)
GetRequiredResource from the supplied request by name. The bool return value indicates whether Crossplane has resolved the requirement.
func GetRequiredResources ¶ added in v0.5.0
GetRequiredResources from the supplied request using the new required_resources field.
func GetRequiredSchema ¶ added in v0.6.0
GetRequiredSchema from the supplied request. Returns the OpenAPI v3 schema as a protobuf Struct. The bool return value indicates whether Crossplane has resolved the requirement. When ok is false, the schema was not yet resolved. When ok is true but the returned struct is nil, the schema was resolved but not found.
func GetRequiredSchemas ¶ added in v0.6.0
func GetRequiredSchemas(req *v1.RunFunctionRequest) map[string]*structpb.Struct
GetRequiredSchemas from the supplied request. Returns all resolved schemas as a map of name to OpenAPI v3 schema protobuf Struct.
func HasCapability ¶ added in v0.6.0
func HasCapability(req *v1.RunFunctionRequest, c v1.Capability) bool
HasCapability returns true if Crossplane advertises the supplied capability in the request metadata. Functions can use this to determine whether Crossplane will honor certain fields in their response, or populate certain fields in their request.
Use AdvertisesCapabilities to check whether Crossplane advertises its capabilities at all. If it doesn't, HasCapability always returns false even for features the older Crossplane does support.
Types ¶
This section is empty.