v1beta1

package
v1.14.3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	FunctionRunnerService_RunFunction_FullMethodName = "/apiextensions.fn.proto.v1beta1.FunctionRunnerService/RunFunction"
)

Variables

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

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

View Source
var File_apiextensions_fn_proto_v1beta1_run_function_proto protoreflect.FileDescriptor
View Source
var FunctionRunnerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "apiextensions.fn.proto.v1beta1.FunctionRunnerService",
	HandlerType: (*FunctionRunnerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RunFunction",
			Handler:    _FunctionRunnerService_RunFunction_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "apiextensions/fn/proto/v1beta1/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 FunctionRunnerServiceClient

type FunctionRunnerServiceClient interface {
	// RunFunction runs the Composition 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.

type FunctionRunnerServiceServer

type FunctionRunnerServiceServer interface {
	// RunFunction runs the Composition 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

type Ready

type Ready int32

Ready indicates whether a composed resource should be considered ready.

const (
	Ready_READY_UNSPECIFIED Ready = 0
	// True means the composed resource has been observed to be ready.
	Ready_READY_TRUE Ready = 1
	// False means the composed resource has not been observed to be ready.
	Ready_READY_FALSE Ready = 2
)

func (Ready) Descriptor

func (Ready) Descriptor() protoreflect.EnumDescriptor

func (Ready) Enum

func (x Ready) Enum() *Ready

func (Ready) EnumDescriptor deprecated

func (Ready) EnumDescriptor() ([]byte, []int)

Deprecated: Use Ready.Descriptor instead.

func (Ready) Number

func (x Ready) Number() protoreflect.EnumNumber

func (Ready) String

func (x Ready) String() string

func (Ready) Type

func (Ready) Type() protoreflect.EnumType

type RequestMeta

type RequestMeta struct {

	// An opaque string identifying the content of the request. Two identical
	// requests should have the same tag.
	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 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 a composite or composed resource.
	//
	//   - A Function may only specify the desired status of a composite resource -
	//     not its metadata or spec. A Function should not return desired metadata
	//     or spec for a composite resource. This will be ignored.
	//
	//   - A Function may not specify the desired status of a composed resource -
	//     only its metadata and spec. A Function should not return desired status
	//     for a composed resource. This 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 composite resource.
	//
	//   - A Function should not set this field in a RunFunctionResponse to indicate
	//     the desired connection details of a composed resource. This will be
	//     ignored.
	ConnectionDetails map[string][]byte `` /* 200-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 composed resource is ready.
	//
	//   - A Function should not set this field in a RunFunctionResponse to indicate
	//     that the desired composite resource is ready. This will be ignored.
	Ready Ready `protobuf:"varint,3,opt,name=ready,proto3,enum=apiextensions.fn.proto.v1beta1.Ready" json:"ready,omitempty"`
	// contains filtered or unexported fields
}

A Resource represents the state of a composite or composed resource.

func (*Resource) Descriptor deprecated

func (*Resource) Descriptor() ([]byte, []int)

Deprecated: Use Resource.ProtoReflect.Descriptor instead.

func (*Resource) GetConnectionDetails

func (x *Resource) GetConnectionDetails() map[string][]byte

func (*Resource) GetReady

func (x *Resource) GetReady() Ready

func (*Resource) GetResource

func (x *Resource) GetResource() *structpb.Struct

func (*Resource) ProtoMessage

func (*Resource) ProtoMessage()

func (*Resource) ProtoReflect

func (x *Resource) ProtoReflect() protoreflect.Message

func (*Resource) Reset

func (x *Resource) Reset()

func (*Resource) String

func (x *Resource) String() string

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. Deterministic Functions with no side-effects
	// (e.g. simple templating Functions) may specify a TTL. Crossplane may choose
	// to cache responses 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.v1beta1.Severity" json:"severity,omitempty"`
	// Human-readable details about the result.
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

A Result of running a Function.

func (*Result) Descriptor deprecated

func (*Result) Descriptor() ([]byte, []int)

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetMessage

func (x *Result) GetMessage() string

func (*Result) GetSeverity

func (x *Result) GetSeverity() Severity

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

func (x *Result) ProtoReflect() protoreflect.Message

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

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 Composition's pipeline.
	Input *structpb.Struct `protobuf:"bytes,4,opt,name=input,proto3,oneof" json:"input,omitempty"`
	// Optional context. Crossplane may pass arbitary 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"`
	// contains filtered or unexported fields
}

A RunFunctionRequest requests that the Composition 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) GetDesired

func (x *RunFunctionRequest) GetDesired() *State

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) 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"`
	// contains filtered or unexported fields
}

A RunFunctionResponse contains the result of a Composition Function run.

func (*RunFunctionResponse) Descriptor deprecated

func (*RunFunctionResponse) Descriptor() ([]byte, []int)

Deprecated: Use RunFunctionResponse.ProtoReflect.Descriptor instead.

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) 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 Composition Functions may run, but
	// the Composition 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 Composition will run to
	// completion but warning events and debug logs associated with the
	// composite resource will be emitted.
	Severity_SEVERITY_WARNING Severity = 2
	// Normal results are emitted as normal events and debug logs associated
	// with the composite resource.
	Severity_SEVERITY_NORMAL Severity = 3
)

func (Severity) Descriptor

func (Severity) Descriptor() protoreflect.EnumDescriptor

func (Severity) Enum

func (x Severity) Enum() *Severity

func (Severity) EnumDescriptor deprecated

func (Severity) EnumDescriptor() ([]byte, []int)

Deprecated: Use Severity.Descriptor instead.

func (Severity) Number

func (x Severity) Number() protoreflect.EnumNumber

func (Severity) String

func (x Severity) String() string

func (Severity) Type

type State

type State struct {

	// The state of the composite resource (XR).
	Composite *Resource `protobuf:"bytes,1,opt,name=composite,proto3" json:"composite,omitempty"`
	// The state of any composed resources.
	Resources map[string]*Resource `` /* 159-byte string literal not displayed */
	// contains filtered or unexported fields
}

State of the composite resource (XR) and any composed resources.

func (*State) Descriptor deprecated

func (*State) Descriptor() ([]byte, []int)

Deprecated: Use State.ProtoReflect.Descriptor instead.

func (*State) GetComposite

func (x *State) GetComposite() *Resource

func (*State) GetResources

func (x *State) GetResources() map[string]*Resource

func (*State) ProtoMessage

func (*State) ProtoMessage()

func (*State) ProtoReflect

func (x *State) ProtoReflect() protoreflect.Message

func (*State) Reset

func (x *State) Reset()

func (*State) String

func (x *State) String() string

type UnimplementedFunctionRunnerServiceServer

type UnimplementedFunctionRunnerServiceServer struct {
}

UnimplementedFunctionRunnerServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedFunctionRunnerServiceServer) RunFunction

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.

Jump to

Keyboard shortcuts

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