response

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 23

Documentation

Overview

Package response contains utilities for working with RunFunctionResponses.

Index

Constants

View Source
const DefaultTTL = 1 * time.Minute

DefaultTTL is the default TTL for which a response can be cached.

Variables

This section is empty.

Functions

func Fatal

func Fatal(rsp *v1beta1.RunFunctionResponse, err error)

Fatal adds a fatal result to the supplied RunFunctionResponse.

func Normal

func Normal(rsp *v1beta1.RunFunctionResponse, message string)

Normal adds a normal result to the supplied RunFunctionResponse.

func Normalf

func Normalf(rsp *v1beta1.RunFunctionResponse, format string, a ...any)

Normalf adds a normal result to the supplied RunFunctionResponse.

func SetContextKey

func SetContextKey(rsp *v1beta1.RunFunctionResponse, key string, v *structpb.Value)

SetContextKey sets context to the supplied key.

func SetDesiredComposedResources

func SetDesiredComposedResources(rsp *v1beta1.RunFunctionResponse, dcds map[resource.Name]*resource.DesiredComposed) error

SetDesiredComposedResources sets the desired composed resources in the supplied response. The caller must be sure to avoid overwriting the desired state that may have been accumulated by previous Functions in the pipeline, unless they intend to.

func SetDesiredCompositeResource

func SetDesiredCompositeResource(rsp *v1beta1.RunFunctionResponse, xr *resource.Composite) error

SetDesiredCompositeResource sets the desired composite resource in the supplied response. The caller must be sure to avoid overwriting the desired state that may have been accumulated by previous Functions in the pipeline, unless they intend to.

func To

To bootstraps a response to the supplied request. It automatically copies the desired state from the request.

func Warning

func Warning(rsp *v1beta1.RunFunctionResponse, err error)

Warning adds a warning result to the supplied RunFunctionResponse.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL