Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterFunctionRunnerServiceServer(s grpc.ServiceRegistrar, srv FunctionRunnerServiceServer)
- type Condition
- func (*Condition) Descriptor() ([]byte, []int)deprecated
- func (x *Condition) GetMessage() string
- func (x *Condition) GetReason() string
- func (x *Condition) GetStatus() Status
- func (x *Condition) GetTarget() Target
- func (x *Condition) GetType() string
- func (*Condition) ProtoMessage()
- func (x *Condition) ProtoReflect() protoreflect.Message
- func (x *Condition) Reset()
- func (x *Condition) String() string
- type CredentialData
- type Credentials
- func (*Credentials) Descriptor() ([]byte, []int)deprecated
- func (x *Credentials) GetCredentialData() *CredentialData
- func (x *Credentials) GetSource() isCredentials_Source
- func (*Credentials) ProtoMessage()
- func (x *Credentials) ProtoReflect() protoreflect.Message
- func (x *Credentials) Reset()
- func (x *Credentials) String() string
- type Credentials_CredentialData
- type FunctionRunnerServiceClient
- type FunctionRunnerServiceServer
- type MatchLabels
- type Ready
- type RequestMeta
- type Requirements
- func (*Requirements) Descriptor() ([]byte, []int)deprecated
- func (x *Requirements) GetExtraResources() map[string]*ResourceSelectordeprecated
- func (x *Requirements) GetResources() map[string]*ResourceSelector
- func (*Requirements) ProtoMessage()
- func (x *Requirements) ProtoReflect() protoreflect.Message
- func (x *Requirements) Reset()
- func (x *Requirements) String() string
- type Resource
- func (*Resource) Descriptor() ([]byte, []int)deprecated
- func (x *Resource) GetConnectionDetails() map[string][]byte
- func (x *Resource) GetReady() Ready
- func (x *Resource) GetResource() *structpb.Struct
- func (*Resource) ProtoMessage()
- func (x *Resource) ProtoReflect() protoreflect.Message
- func (x *Resource) Reset()
- func (x *Resource) String() string
- type ResourceSelector
- func (*ResourceSelector) Descriptor() ([]byte, []int)deprecated
- func (x *ResourceSelector) GetApiVersion() string
- func (x *ResourceSelector) GetKind() string
- func (x *ResourceSelector) GetMatch() isResourceSelector_Match
- func (x *ResourceSelector) GetMatchLabels() *MatchLabels
- func (x *ResourceSelector) GetMatchName() string
- func (x *ResourceSelector) GetNamespace() string
- func (*ResourceSelector) ProtoMessage()
- func (x *ResourceSelector) ProtoReflect() protoreflect.Message
- func (x *ResourceSelector) Reset()
- func (x *ResourceSelector) String() string
- type ResourceSelector_MatchLabels
- type ResourceSelector_MatchName
- type Resources
- type ResponseMeta
- func (*ResponseMeta) Descriptor() ([]byte, []int)deprecated
- func (x *ResponseMeta) GetTag() string
- func (x *ResponseMeta) GetTtl() *durationpb.Duration
- func (*ResponseMeta) ProtoMessage()
- func (x *ResponseMeta) ProtoReflect() protoreflect.Message
- func (x *ResponseMeta) Reset()
- func (x *ResponseMeta) String() string
- type Result
- func (*Result) Descriptor() ([]byte, []int)deprecated
- func (x *Result) GetMessage() string
- func (x *Result) GetReason() string
- func (x *Result) GetSeverity() Severity
- func (x *Result) GetTarget() Target
- func (*Result) ProtoMessage()
- func (x *Result) ProtoReflect() protoreflect.Message
- func (x *Result) Reset()
- func (x *Result) String() string
- type RunFunctionRequest
- func (*RunFunctionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RunFunctionRequest) GetContext() *structpb.Struct
- func (x *RunFunctionRequest) GetCredentials() map[string]*Credentials
- func (x *RunFunctionRequest) GetDesired() *State
- func (x *RunFunctionRequest) GetExtraResources() map[string]*Resourcesdeprecated
- func (x *RunFunctionRequest) GetInput() *structpb.Struct
- func (x *RunFunctionRequest) GetMeta() *RequestMeta
- func (x *RunFunctionRequest) GetObserved() *State
- func (x *RunFunctionRequest) GetRequiredResources() map[string]*Resources
- func (*RunFunctionRequest) ProtoMessage()
- func (x *RunFunctionRequest) ProtoReflect() protoreflect.Message
- func (x *RunFunctionRequest) Reset()
- func (x *RunFunctionRequest) String() string
- type RunFunctionResponse
- func (*RunFunctionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RunFunctionResponse) GetConditions() []*Condition
- func (x *RunFunctionResponse) GetContext() *structpb.Struct
- func (x *RunFunctionResponse) GetDesired() *State
- func (x *RunFunctionResponse) GetMeta() *ResponseMeta
- func (x *RunFunctionResponse) GetOutput() *structpb.Struct
- func (x *RunFunctionResponse) GetRequirements() *Requirements
- func (x *RunFunctionResponse) GetResults() []*Result
- func (*RunFunctionResponse) ProtoMessage()
- func (x *RunFunctionResponse) ProtoReflect() protoreflect.Message
- func (x *RunFunctionResponse) Reset()
- func (x *RunFunctionResponse) String() string
- type Severity
- type State
- type Status
- type Target
- type UnimplementedFunctionRunnerServiceServer
- type UnsafeFunctionRunnerServiceServer
Constants ¶
const (
FunctionRunnerService_RunFunction_FullMethodName = "/apiextensions.fn.proto.v1.FunctionRunnerService/RunFunction"
)
Variables ¶
var ( Ready_name = map[int32]string{ 0: "READY_UNSPECIFIED", 1: "READY_TRUE", 2: "READY_FALSE", } Ready_value = map[string]int32{ "READY_UNSPECIFIED": 0, "READY_TRUE": 1, "READY_FALSE": 2, } )
Enum value maps for Ready.
var ( Severity_name = map[int32]string{ 0: "SEVERITY_UNSPECIFIED", 1: "SEVERITY_FATAL", 2: "SEVERITY_WARNING", 3: "SEVERITY_NORMAL", } Severity_value = map[string]int32{ "SEVERITY_UNSPECIFIED": 0, "SEVERITY_FATAL": 1, "SEVERITY_WARNING": 2, "SEVERITY_NORMAL": 3, } )
Enum value maps for Severity.
var ( Target_name = map[int32]string{ 0: "TARGET_UNSPECIFIED", 1: "TARGET_COMPOSITE", 2: "TARGET_COMPOSITE_AND_CLAIM", } Target_value = map[string]int32{ "TARGET_UNSPECIFIED": 0, "TARGET_COMPOSITE": 1, "TARGET_COMPOSITE_AND_CLAIM": 2, } )
Enum value maps for Target.
var ( Status_name = map[int32]string{ 0: "STATUS_CONDITION_UNSPECIFIED", 1: "STATUS_CONDITION_UNKNOWN", 2: "STATUS_CONDITION_TRUE", 3: "STATUS_CONDITION_FALSE", } Status_value = map[string]int32{ "STATUS_CONDITION_UNSPECIFIED": 0, "STATUS_CONDITION_UNKNOWN": 1, "STATUS_CONDITION_TRUE": 2, "STATUS_CONDITION_FALSE": 3, } )
Enum value maps for Status.
var File_v1_run_function_proto protoreflect.FileDescriptor
var FunctionRunnerService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "apiextensions.fn.proto.v1.FunctionRunnerService", HandlerType: (*FunctionRunnerServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "RunFunction", Handler: _FunctionRunnerService_RunFunction_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "v1/run_function.proto", }
FunctionRunnerService_ServiceDesc is the grpc.ServiceDesc for FunctionRunnerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterFunctionRunnerServiceServer ¶
func RegisterFunctionRunnerServiceServer(s grpc.ServiceRegistrar, srv FunctionRunnerServiceServer)
Types ¶
type Condition ¶
type Condition struct {
// Type of condition in PascalCase.
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
// Status of the condition.
Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=apiextensions.fn.proto.v1.Status" json:"status,omitempty"`
// Reason contains a programmatic identifier indicating the reason for the
// condition's last transition. Producers of specific condition types may
// define expected values and meanings for this field, and whether the values
// are considered a guaranteed API. The value should be a PascalCase string.
// This field may not be empty.
Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"`
// Message is a human readable message indicating details about the
// transition. This may be an empty string.
Message *string `protobuf:"bytes,4,opt,name=message,proto3,oneof" json:"message,omitempty"`
// The resources this condition targets.
Target *Target `protobuf:"varint,5,opt,name=target,proto3,enum=apiextensions.fn.proto.v1.Target,oneof" json:"target,omitempty"`
// contains filtered or unexported fields
}
Status condition to be applied to the XR. Condition may also optionally be applied to the XR's associated claim. For detailed information on proper usage of status conditions, please see https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties.
func (*Condition) Descriptor
deprecated
func (*Condition) GetMessage ¶
func (*Condition) ProtoMessage ¶
func (*Condition) ProtoMessage()
func (*Condition) ProtoReflect ¶
func (x *Condition) ProtoReflect() protoreflect.Message
type CredentialData ¶
type CredentialData struct {
Data map[string][]byte `` /* 135-byte string literal not displayed */
// contains filtered or unexported fields
}
CredentialData loaded by Crossplane, for example from a Secret.
func (*CredentialData) Descriptor
deprecated
func (*CredentialData) Descriptor() ([]byte, []int)
Deprecated: Use CredentialData.ProtoReflect.Descriptor instead.
func (*CredentialData) GetData ¶
func (x *CredentialData) GetData() map[string][]byte
func (*CredentialData) ProtoMessage ¶
func (*CredentialData) ProtoMessage()
func (*CredentialData) ProtoReflect ¶
func (x *CredentialData) ProtoReflect() protoreflect.Message
func (*CredentialData) Reset ¶
func (x *CredentialData) Reset()
func (*CredentialData) String ¶
func (x *CredentialData) String() string
type Credentials ¶
type Credentials struct {
// Source of the credentials.
//
// Types that are valid to be assigned to Source:
//
// *Credentials_CredentialData
Source isCredentials_Source `protobuf_oneof:"source"`
// contains filtered or unexported fields
}
Credentials that a function may use to communicate with an external system.
func (*Credentials) Descriptor
deprecated
func (*Credentials) Descriptor() ([]byte, []int)
Deprecated: Use Credentials.ProtoReflect.Descriptor instead.
func (*Credentials) GetCredentialData ¶
func (x *Credentials) GetCredentialData() *CredentialData
func (*Credentials) GetSource ¶
func (x *Credentials) GetSource() isCredentials_Source
func (*Credentials) ProtoMessage ¶
func (*Credentials) ProtoMessage()
func (*Credentials) ProtoReflect ¶
func (x *Credentials) ProtoReflect() protoreflect.Message
func (*Credentials) Reset ¶
func (x *Credentials) Reset()
func (*Credentials) String ¶
func (x *Credentials) String() string
type Credentials_CredentialData ¶
type Credentials_CredentialData struct {
// Credential data loaded by Crossplane, for example from a Secret.
CredentialData *CredentialData `protobuf:"bytes,1,opt,name=credential_data,json=credentialData,proto3,oneof"`
}
type FunctionRunnerServiceClient ¶
type FunctionRunnerServiceClient interface {
// RunFunction runs the function.
RunFunction(ctx context.Context, in *RunFunctionRequest, opts ...grpc.CallOption) (*RunFunctionResponse, error)
}
FunctionRunnerServiceClient is the client API for FunctionRunnerService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
A FunctionRunnerService is a function.
func NewFunctionRunnerServiceClient ¶
func NewFunctionRunnerServiceClient(cc grpc.ClientConnInterface) FunctionRunnerServiceClient
type FunctionRunnerServiceServer ¶
type FunctionRunnerServiceServer interface {
// RunFunction runs the function.
RunFunction(context.Context, *RunFunctionRequest) (*RunFunctionResponse, error)
// contains filtered or unexported methods
}
FunctionRunnerServiceServer is the server API for FunctionRunnerService service. All implementations must embed UnimplementedFunctionRunnerServiceServer for forward compatibility.
A FunctionRunnerService is a function.
type MatchLabels ¶
type MatchLabels struct {
Labels map[string]string `` /* 139-byte string literal not displayed */
// contains filtered or unexported fields
}
MatchLabels defines a set of labels to match resources against.
func (*MatchLabels) Descriptor
deprecated
func (*MatchLabels) Descriptor() ([]byte, []int)
Deprecated: Use MatchLabels.ProtoReflect.Descriptor instead.
func (*MatchLabels) GetLabels ¶
func (x *MatchLabels) GetLabels() map[string]string
func (*MatchLabels) ProtoMessage ¶
func (*MatchLabels) ProtoMessage()
func (*MatchLabels) ProtoReflect ¶
func (x *MatchLabels) ProtoReflect() protoreflect.Message
func (*MatchLabels) Reset ¶
func (x *MatchLabels) Reset()
func (*MatchLabels) String ¶
func (x *MatchLabels) String() string
type Ready ¶
type Ready int32
Ready indicates whether a resource should be considered ready.
func (Ready) Descriptor ¶
func (Ready) Descriptor() protoreflect.EnumDescriptor
func (Ready) EnumDescriptor
deprecated
func (Ready) Number ¶
func (x Ready) Number() protoreflect.EnumNumber
func (Ready) Type ¶
func (Ready) Type() protoreflect.EnumType
type RequestMeta ¶
type RequestMeta struct {
// An opaque string identifying a request. Requests with identical tags will
// be otherwise identical.
Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
// contains filtered or unexported fields
}
RequestMeta contains metadata pertaining to a RunFunctionRequest.
func (*RequestMeta) Descriptor
deprecated
func (*RequestMeta) Descriptor() ([]byte, []int)
Deprecated: Use RequestMeta.ProtoReflect.Descriptor instead.
func (*RequestMeta) GetTag ¶
func (x *RequestMeta) GetTag() string
func (*RequestMeta) ProtoMessage ¶
func (*RequestMeta) ProtoMessage()
func (*RequestMeta) ProtoReflect ¶
func (x *RequestMeta) ProtoReflect() protoreflect.Message
func (*RequestMeta) Reset ¶
func (x *RequestMeta) Reset()
func (*RequestMeta) String ¶
func (x *RequestMeta) String() string
type Requirements ¶
type Requirements struct {
// Resources that this function requires. The map key uniquely identifies the
// group of resources.
//
// Deprecated: Use resources instead.
//
// Deprecated: Marked as deprecated in v1/run_function.proto.
ExtraResources map[string]*ResourceSelector `` /* 177-byte string literal not displayed */
// Resources that this function requires. The map key uniquely identifies the
// group of resources.
Resources map[string]*ResourceSelector `` /* 145-byte string literal not displayed */
// contains filtered or unexported fields
}
Requirements that must be satisfied for a function to run successfully.
func (*Requirements) Descriptor
deprecated
func (*Requirements) Descriptor() ([]byte, []int)
Deprecated: Use Requirements.ProtoReflect.Descriptor instead.
func (*Requirements) GetExtraResources
deprecated
func (x *Requirements) GetExtraResources() map[string]*ResourceSelector
Deprecated: Marked as deprecated in v1/run_function.proto.
func (*Requirements) GetResources ¶ added in v0.5.0
func (x *Requirements) GetResources() map[string]*ResourceSelector
func (*Requirements) ProtoMessage ¶
func (*Requirements) ProtoMessage()
func (*Requirements) ProtoReflect ¶
func (x *Requirements) ProtoReflect() protoreflect.Message
func (*Requirements) Reset ¶
func (x *Requirements) Reset()
func (*Requirements) String ¶
func (x *Requirements) String() string
type Resource ¶
type Resource 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.
Resource *structpb.Struct `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
// 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 the XR.
//
// * 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.
ConnectionDetails map[string][]byte `` /* 186-byte string literal not displayed */
// Ready 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 the composed resources.
//
// Ready is only used for composition. It's ignored by Operations.
Ready Ready `protobuf:"varint,3,opt,name=ready,proto3,enum=apiextensions.fn.proto.v1.Ready" json:"ready,omitempty"`
// contains filtered or unexported fields
}
A Resource represents the state of a Kubernetes resource.
func (*Resource) Descriptor
deprecated
func (*Resource) GetConnectionDetails ¶
func (*Resource) GetResource ¶
func (*Resource) ProtoMessage ¶
func (*Resource) ProtoMessage()
func (*Resource) ProtoReflect ¶
func (x *Resource) ProtoReflect() protoreflect.Message
type ResourceSelector ¶
type ResourceSelector struct {
// API version of resources to select.
ApiVersion string `protobuf:"bytes,1,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"`
// Kind of resources to select.
Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
// Resources to match.
//
// Types that are valid to be assigned to Match:
//
// *ResourceSelector_MatchName
// *ResourceSelector_MatchLabels
Match isResourceSelector_Match `protobuf_oneof:"match"`
// Match resources in this namespace. Omit namespace to match cluster scoped
// resources, or to match namespaced resources by labels across all
// namespaces.
Namespace *string `protobuf:"bytes,5,opt,name=namespace,proto3,oneof" json:"namespace,omitempty"`
// contains filtered or unexported fields
}
ResourceSelector selects a group of resources, either by name or by label.
func (*ResourceSelector) Descriptor
deprecated
func (*ResourceSelector) Descriptor() ([]byte, []int)
Deprecated: Use ResourceSelector.ProtoReflect.Descriptor instead.
func (*ResourceSelector) GetApiVersion ¶
func (x *ResourceSelector) GetApiVersion() string
func (*ResourceSelector) GetKind ¶
func (x *ResourceSelector) GetKind() string
func (*ResourceSelector) GetMatch ¶
func (x *ResourceSelector) GetMatch() isResourceSelector_Match
func (*ResourceSelector) GetMatchLabels ¶
func (x *ResourceSelector) GetMatchLabels() *MatchLabels
func (*ResourceSelector) GetMatchName ¶
func (x *ResourceSelector) GetMatchName() string
func (*ResourceSelector) GetNamespace ¶ added in v0.5.0
func (x *ResourceSelector) GetNamespace() string
func (*ResourceSelector) ProtoMessage ¶
func (*ResourceSelector) ProtoMessage()
func (*ResourceSelector) ProtoReflect ¶
func (x *ResourceSelector) ProtoReflect() protoreflect.Message
func (*ResourceSelector) Reset ¶
func (x *ResourceSelector) Reset()
func (*ResourceSelector) String ¶
func (x *ResourceSelector) String() string
type ResourceSelector_MatchLabels ¶
type ResourceSelector_MatchLabels struct {
// Match all resources with these labels.
MatchLabels *MatchLabels `protobuf:"bytes,4,opt,name=match_labels,json=matchLabels,proto3,oneof"`
}
type ResourceSelector_MatchName ¶
type ResourceSelector_MatchName struct {
// Match the resource with this name.
MatchName string `protobuf:"bytes,3,opt,name=match_name,json=matchName,proto3,oneof"`
}
type Resources ¶
type Resources struct {
Items []*Resource `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
// contains filtered or unexported fields
}
Resources represents the state of several Crossplane resources.
func (*Resources) Descriptor
deprecated
func (*Resources) ProtoMessage ¶
func (*Resources) ProtoMessage()
func (*Resources) ProtoReflect ¶
func (x *Resources) ProtoReflect() protoreflect.Message
type ResponseMeta ¶
type ResponseMeta struct {
// An opaque string identifying the content of the request. Must match the
// meta.tag of the corresponding RunFunctionRequest.
Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
// Time-to-live of this response. Crossplane will call the function again when
// the TTL expires. Crossplane may cache the response to avoid calling the
// function again until the TTL expires.
Ttl *durationpb.Duration `protobuf:"bytes,2,opt,name=ttl,proto3,oneof" json:"ttl,omitempty"`
// contains filtered or unexported fields
}
ResponseMeta contains metadata pertaining to a RunFunctionResponse.
func (*ResponseMeta) Descriptor
deprecated
func (*ResponseMeta) Descriptor() ([]byte, []int)
Deprecated: Use ResponseMeta.ProtoReflect.Descriptor instead.
func (*ResponseMeta) GetTag ¶
func (x *ResponseMeta) GetTag() string
func (*ResponseMeta) GetTtl ¶
func (x *ResponseMeta) GetTtl() *durationpb.Duration
func (*ResponseMeta) ProtoMessage ¶
func (*ResponseMeta) ProtoMessage()
func (*ResponseMeta) ProtoReflect ¶
func (x *ResponseMeta) ProtoReflect() protoreflect.Message
func (*ResponseMeta) Reset ¶
func (x *ResponseMeta) Reset()
func (*ResponseMeta) String ¶
func (x *ResponseMeta) String() string
type Result ¶
type Result struct {
// Severity of this result.
Severity Severity `protobuf:"varint,1,opt,name=severity,proto3,enum=apiextensions.fn.proto.v1.Severity" json:"severity,omitempty"`
// Human-readable details about the result.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// Optional PascalCase, machine-readable reason for this result. If omitted,
// the value will be ComposeResources.
Reason *string `protobuf:"bytes,3,opt,name=reason,proto3,oneof" json:"reason,omitempty"`
// The resources this result targets.
Target *Target `protobuf:"varint,4,opt,name=target,proto3,enum=apiextensions.fn.proto.v1.Target,oneof" json:"target,omitempty"`
// contains filtered or unexported fields
}
A Result of running a function.
func (*Result) Descriptor
deprecated
func (*Result) GetMessage ¶
func (*Result) GetSeverity ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
func (*Result) ProtoReflect ¶
func (x *Result) ProtoReflect() protoreflect.Message
type RunFunctionRequest ¶
type RunFunctionRequest struct {
// Metadata pertaining to this request.
Meta *RequestMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
// 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.
Observed *State `protobuf:"bytes,2,opt,name=observed,proto3" json:"observed,omitempty"`
// 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.
Desired *State `protobuf:"bytes,3,opt,name=desired,proto3" json:"desired,omitempty"`
// Optional input specific to this function invocation. A JSON representation
// of the 'input' block of the relevant entry in a function pipeline.
Input *structpb.Struct `protobuf:"bytes,4,opt,name=input,proto3,oneof" json:"input,omitempty"`
// 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.
Context *structpb.Struct `protobuf:"bytes,5,opt,name=context,proto3,oneof" json:"context,omitempty"`
// 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.
//
// Deprecated: Marked as deprecated in v1/run_function.proto.
ExtraResources map[string]*Resources `` /* 177-byte string literal not displayed */
// Optional credentials that this function may use to communicate with an
// external system.
Credentials map[string]*Credentials `` /* 149-byte string literal not displayed */
// 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.
RequiredResources map[string]*Resources `` /* 186-byte string literal not displayed */
// contains filtered or unexported fields
}
A RunFunctionRequest requests that the function be run.
func (*RunFunctionRequest) Descriptor
deprecated
func (*RunFunctionRequest) Descriptor() ([]byte, []int)
Deprecated: Use RunFunctionRequest.ProtoReflect.Descriptor instead.
func (*RunFunctionRequest) GetContext ¶
func (x *RunFunctionRequest) GetContext() *structpb.Struct
func (*RunFunctionRequest) GetCredentials ¶
func (x *RunFunctionRequest) GetCredentials() map[string]*Credentials
func (*RunFunctionRequest) GetDesired ¶
func (x *RunFunctionRequest) GetDesired() *State
func (*RunFunctionRequest) GetExtraResources
deprecated
func (x *RunFunctionRequest) GetExtraResources() map[string]*Resources
Deprecated: Marked as deprecated in v1/run_function.proto.
func (*RunFunctionRequest) GetInput ¶
func (x *RunFunctionRequest) GetInput() *structpb.Struct
func (*RunFunctionRequest) GetMeta ¶
func (x *RunFunctionRequest) GetMeta() *RequestMeta
func (*RunFunctionRequest) GetObserved ¶
func (x *RunFunctionRequest) GetObserved() *State
func (*RunFunctionRequest) GetRequiredResources ¶ added in v0.5.0
func (x *RunFunctionRequest) GetRequiredResources() map[string]*Resources
func (*RunFunctionRequest) ProtoMessage ¶
func (*RunFunctionRequest) ProtoMessage()
func (*RunFunctionRequest) ProtoReflect ¶
func (x *RunFunctionRequest) ProtoReflect() protoreflect.Message
func (*RunFunctionRequest) Reset ¶
func (x *RunFunctionRequest) Reset()
func (*RunFunctionRequest) String ¶
func (x *RunFunctionRequest) String() string
type RunFunctionResponse ¶
type RunFunctionResponse struct {
// Metadata pertaining to this response.
Meta *ResponseMeta `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"`
// Desired state according to a function pipeline. functions may add desired
// state, and may mutate or delete any part of the desired state they are
// concerned with. A function must pass through any part of the desired state
// that it is not concerned with.
//
// 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.
Desired *State `protobuf:"bytes,2,opt,name=desired,proto3" json:"desired,omitempty"`
// Results of the function run. Results are used for observability purposes.
Results []*Result `protobuf:"bytes,3,rep,name=results,proto3" json:"results,omitempty"`
// Optional context to be passed to the next function in the pipeline as part
// of the RunFunctionRequest. Dropped on the last function in the pipeline.
Context *structpb.Struct `protobuf:"bytes,4,opt,name=context,proto3,oneof" json:"context,omitempty"`
// Requirements that must be satisfied for this function to run successfully.
Requirements *Requirements `protobuf:"bytes,5,opt,name=requirements,proto3" json:"requirements,omitempty"`
// Status conditions to be applied to the XR. Conditions may also optionally
// be applied to the XR's associated claim.
//
// Conditions are only used for composition. They're ignored by Operations.
Conditions []*Condition `protobuf:"bytes,6,rep,name=conditions,proto3" json:"conditions,omitempty"`
// Optional output specific to this function invocation.
//
// Only Operations use function output. XRs will discard any function output.
Output *structpb.Struct `protobuf:"bytes,7,opt,name=output,proto3,oneof" json:"output,omitempty"`
// contains filtered or unexported fields
}
A RunFunctionResponse contains the result of a function run.
func (*RunFunctionResponse) Descriptor
deprecated
func (*RunFunctionResponse) Descriptor() ([]byte, []int)
Deprecated: Use RunFunctionResponse.ProtoReflect.Descriptor instead.
func (*RunFunctionResponse) GetConditions ¶
func (x *RunFunctionResponse) GetConditions() []*Condition
func (*RunFunctionResponse) GetContext ¶
func (x *RunFunctionResponse) GetContext() *structpb.Struct
func (*RunFunctionResponse) GetDesired ¶
func (x *RunFunctionResponse) GetDesired() *State
func (*RunFunctionResponse) GetMeta ¶
func (x *RunFunctionResponse) GetMeta() *ResponseMeta
func (*RunFunctionResponse) GetOutput ¶ added in v0.5.0
func (x *RunFunctionResponse) GetOutput() *structpb.Struct
func (*RunFunctionResponse) GetRequirements ¶
func (x *RunFunctionResponse) GetRequirements() *Requirements
func (*RunFunctionResponse) GetResults ¶
func (x *RunFunctionResponse) GetResults() []*Result
func (*RunFunctionResponse) ProtoMessage ¶
func (*RunFunctionResponse) ProtoMessage()
func (*RunFunctionResponse) ProtoReflect ¶
func (x *RunFunctionResponse) ProtoReflect() protoreflect.Message
func (*RunFunctionResponse) Reset ¶
func (x *RunFunctionResponse) Reset()
func (*RunFunctionResponse) String ¶
func (x *RunFunctionResponse) String() string
type Severity ¶
type Severity int32
Severity of function results.
const ( Severity_SEVERITY_UNSPECIFIED Severity = 0 // Fatal results are fatal; subsequent functions may run, but the function // pipeline run will be considered a failure and the first fatal result will // be returned as an error. Severity_SEVERITY_FATAL Severity = 1 // Warning results are non-fatal; the entire pipeline will run to completion // but warning events and debug logs associated with the XR or Operation will // be emitted. Severity_SEVERITY_WARNING Severity = 2 // Normal results are emitted as normal events and debug logs associated with // the XR or operation. Severity_SEVERITY_NORMAL Severity = 3 )
func (Severity) Descriptor ¶
func (Severity) Descriptor() protoreflect.EnumDescriptor
func (Severity) EnumDescriptor
deprecated
func (Severity) Number ¶
func (x Severity) Number() protoreflect.EnumNumber
func (Severity) Type ¶
func (Severity) Type() protoreflect.EnumType
type State ¶
type State struct {
// The state of the XR (XR).
Composite *Resource `protobuf:"bytes,1,opt,name=composite,proto3" json:"composite,omitempty"`
// The state of any other resources. In composition functions these are the
// composed resources. In operation functions they're arbitrary resources that
// the operation wants to create or update.
Resources map[string]*Resource `` /* 145-byte string literal not displayed */
// contains filtered or unexported fields
}
State of the XR (XR) and any resources.
func (*State) Descriptor
deprecated
func (*State) GetComposite ¶
func (*State) GetResources ¶
func (*State) ProtoMessage ¶
func (*State) ProtoMessage()
func (*State) ProtoReflect ¶
func (x *State) ProtoReflect() protoreflect.Message
type Status ¶
type Status int32
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
type Target ¶
type Target int32
Target of function results and conditions.
const ( // If the target is unspecified, the result targets the XR. Target_TARGET_UNSPECIFIED Target = 0 // Target the XR. Results that target the XR should include detailed, advanced // information. Target_TARGET_COMPOSITE Target = 1 // Target the XR and the claim. Results that target the XR and the claim // should include only end-user friendly information. Target_TARGET_COMPOSITE_AND_CLAIM Target = 2 )
func (Target) Descriptor ¶
func (Target) Descriptor() protoreflect.EnumDescriptor
func (Target) EnumDescriptor
deprecated
func (Target) Number ¶
func (x Target) Number() protoreflect.EnumNumber
func (Target) Type ¶
func (Target) Type() protoreflect.EnumType
type UnimplementedFunctionRunnerServiceServer ¶
type UnimplementedFunctionRunnerServiceServer struct{}
UnimplementedFunctionRunnerServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedFunctionRunnerServiceServer) RunFunction ¶
func (UnimplementedFunctionRunnerServiceServer) RunFunction(context.Context, *RunFunctionRequest) (*RunFunctionResponse, error)
type UnsafeFunctionRunnerServiceServer ¶
type UnsafeFunctionRunnerServiceServer interface {
// contains filtered or unexported methods
}
UnsafeFunctionRunnerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FunctionRunnerServiceServer will result in compilation errors.