v1alpha1

package
v4.46.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContainerizedFunctionRunnerService_RunFunction_FullMethodName = "/apiextensions.fn.proto.v1alpha1.ContainerizedFunctionRunnerService/RunFunction"
)

Variables

View Source
var (
	ImagePullPolicy_name = map[int32]string{
		0: "IMAGE_PULL_POLICY_UNSPECIFIED",
		1: "IMAGE_PULL_POLICY_IF_NOT_PRESENT",
		2: "IMAGE_PULL_POLICY_ALWAYS",
		3: "IMAGE_PULL_POLICY_NEVER",
	}
	ImagePullPolicy_value = map[string]int32{
		"IMAGE_PULL_POLICY_UNSPECIFIED":    0,
		"IMAGE_PULL_POLICY_IF_NOT_PRESENT": 1,
		"IMAGE_PULL_POLICY_ALWAYS":         2,
		"IMAGE_PULL_POLICY_NEVER":          3,
	}
)

Enum value maps for ImagePullPolicy.

View Source
var (
	NetworkPolicy_name = map[int32]string{
		0: "NETWORK_POLICY_UNSPECIFIED",
		1: "NETWORK_POLICY_ISOLATED",
		2: "NETWORK_POLICY_RUNNER",
	}
	NetworkPolicy_value = map[string]int32{
		"NETWORK_POLICY_UNSPECIFIED": 0,
		"NETWORK_POLICY_ISOLATED":    1,
		"NETWORK_POLICY_RUNNER":      2,
	}
)

Enum value maps for NetworkPolicy.

View Source
var ContainerizedFunctionRunnerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "apiextensions.fn.proto.v1alpha1.ContainerizedFunctionRunnerService",
	HandlerType: (*ContainerizedFunctionRunnerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RunFunction",
			Handler:    _ContainerizedFunctionRunnerService_RunFunction_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "apiextensions/fn/proto/v1alpha1/run_function.proto",
}

ContainerizedFunctionRunnerService_ServiceDesc is the grpc.ServiceDesc for ContainerizedFunctionRunnerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_apiextensions_fn_proto_v1alpha1_run_function_proto protoreflect.FileDescriptor

Functions

Types

type ContainerizedFunctionRunnerServiceClient

type ContainerizedFunctionRunnerServiceClient interface {
	// RunFunction runs a containerized function.
	RunFunction(ctx context.Context, in *RunFunctionRequest, opts ...grpc.CallOption) (*RunFunctionResponse, error)
}

ContainerizedFunctionRunnerServiceClient is the client API for ContainerizedFunctionRunnerService 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 ContainerizedFunctionRunnerServiceServer

type ContainerizedFunctionRunnerServiceServer interface {
	// RunFunction runs a containerized function.
	RunFunction(context.Context, *RunFunctionRequest) (*RunFunctionResponse, error)
	// contains filtered or unexported methods
}

ContainerizedFunctionRunnerServiceServer is the server API for ContainerizedFunctionRunnerService service. All implementations must embed UnimplementedContainerizedFunctionRunnerServiceServer for forward compatibility

type ImagePullAuth

type ImagePullAuth struct {
	Username      string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password      string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	Auth          string `protobuf:"bytes,3,opt,name=auth,proto3" json:"auth,omitempty"`
	IdentityToken string `protobuf:"bytes,4,opt,name=identity_token,json=identityToken,proto3" json:"identity_token,omitempty"`
	RegistryToken string `protobuf:"bytes,5,opt,name=registry_token,json=registryToken,proto3" json:"registry_token,omitempty"`
	// contains filtered or unexported fields
}

ImagePullAuth configures authentication to a remote OCI registry. It corresponds to go-containerregistry's AuthConfig type. https://pkg.go.dev/github.com/google/go-containerregistry@v0.11.0/pkg/authn#AuthConfig

func (*ImagePullAuth) Descriptor deprecated

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

Deprecated: Use ImagePullAuth.ProtoReflect.Descriptor instead.

func (*ImagePullAuth) GetAuth

func (x *ImagePullAuth) GetAuth() string

func (*ImagePullAuth) GetIdentityToken

func (x *ImagePullAuth) GetIdentityToken() string

func (*ImagePullAuth) GetPassword

func (x *ImagePullAuth) GetPassword() string

func (*ImagePullAuth) GetRegistryToken

func (x *ImagePullAuth) GetRegistryToken() string

func (*ImagePullAuth) GetUsername

func (x *ImagePullAuth) GetUsername() string

func (*ImagePullAuth) ProtoMessage

func (*ImagePullAuth) ProtoMessage()

func (*ImagePullAuth) ProtoReflect

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

func (*ImagePullAuth) Reset

func (x *ImagePullAuth) Reset()

func (*ImagePullAuth) String

func (x *ImagePullAuth) String() string

type ImagePullConfig

type ImagePullConfig struct {
	PullPolicy ImagePullPolicy `` /* 145-byte string literal not displayed */
	Auth       *ImagePullAuth  `protobuf:"bytes,2,opt,name=auth,proto3" json:"auth,omitempty"`
	// contains filtered or unexported fields
}

ImagePullConfig configures how a Composition Function container should be pulled from a remote OCI registry.

func (*ImagePullConfig) Descriptor deprecated

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

Deprecated: Use ImagePullConfig.ProtoReflect.Descriptor instead.

func (*ImagePullConfig) GetAuth

func (x *ImagePullConfig) GetAuth() *ImagePullAuth

func (*ImagePullConfig) GetPullPolicy

func (x *ImagePullConfig) GetPullPolicy() ImagePullPolicy

func (*ImagePullConfig) ProtoMessage

func (*ImagePullConfig) ProtoMessage()

func (*ImagePullConfig) ProtoReflect

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

func (*ImagePullConfig) Reset

func (x *ImagePullConfig) Reset()

func (*ImagePullConfig) String

func (x *ImagePullConfig) String() string

type ImagePullPolicy

type ImagePullPolicy int32

ImagePullPolicy specifies when a Composition Function container should be pulled from a remote OCI registry.

const (
	ImagePullPolicy_IMAGE_PULL_POLICY_UNSPECIFIED    ImagePullPolicy = 0
	ImagePullPolicy_IMAGE_PULL_POLICY_IF_NOT_PRESENT ImagePullPolicy = 1
	ImagePullPolicy_IMAGE_PULL_POLICY_ALWAYS         ImagePullPolicy = 2
	ImagePullPolicy_IMAGE_PULL_POLICY_NEVER          ImagePullPolicy = 3
)

func (ImagePullPolicy) Descriptor

func (ImagePullPolicy) Enum

func (x ImagePullPolicy) Enum() *ImagePullPolicy

func (ImagePullPolicy) EnumDescriptor deprecated

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

Deprecated: Use ImagePullPolicy.Descriptor instead.

func (ImagePullPolicy) Number

func (ImagePullPolicy) String

func (x ImagePullPolicy) String() string

func (ImagePullPolicy) Type

type NetworkConfig

type NetworkConfig struct {

	// Whether or not the container can access the network.
	Policy NetworkPolicy `protobuf:"varint,1,opt,name=policy,proto3,enum=apiextensions.fn.proto.v1alpha1.NetworkPolicy" json:"policy,omitempty"`
	// contains filtered or unexported fields
}

NetworkConfig configures whether and how a Composition Function container may access the network.

func (*NetworkConfig) Descriptor deprecated

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

Deprecated: Use NetworkConfig.ProtoReflect.Descriptor instead.

func (*NetworkConfig) GetPolicy

func (x *NetworkConfig) GetPolicy() NetworkPolicy

func (*NetworkConfig) ProtoMessage

func (*NetworkConfig) ProtoMessage()

func (*NetworkConfig) ProtoReflect

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

func (*NetworkConfig) Reset

func (x *NetworkConfig) Reset()

func (*NetworkConfig) String

func (x *NetworkConfig) String() string

type NetworkPolicy

type NetworkPolicy int32

NetworkPolicy configures whether a container is isolated from the network.

const (
	NetworkPolicy_NETWORK_POLICY_UNSPECIFIED NetworkPolicy = 0
	// Run the container without network access. The default.
	NetworkPolicy_NETWORK_POLICY_ISOLATED NetworkPolicy = 1
	// Allow the container to access the same network as the function runner.
	NetworkPolicy_NETWORK_POLICY_RUNNER NetworkPolicy = 2
)

func (NetworkPolicy) Descriptor

func (NetworkPolicy) Enum

func (x NetworkPolicy) Enum() *NetworkPolicy

func (NetworkPolicy) EnumDescriptor deprecated

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

Deprecated: Use NetworkPolicy.Descriptor instead.

func (NetworkPolicy) Number

func (NetworkPolicy) String

func (x NetworkPolicy) String() string

func (NetworkPolicy) Type

type ResourceConfig

type ResourceConfig struct {
	Limits *ResourceLimits `protobuf:"bytes,1,opt,name=limits,proto3" json:"limits,omitempty"`
	// contains filtered or unexported fields
}

Resources configures what compute resources should be available to a Composition Function container.

func (*ResourceConfig) Descriptor deprecated

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

Deprecated: Use ResourceConfig.ProtoReflect.Descriptor instead.

func (*ResourceConfig) GetLimits

func (x *ResourceConfig) GetLimits() *ResourceLimits

func (*ResourceConfig) ProtoMessage

func (*ResourceConfig) ProtoMessage()

func (*ResourceConfig) ProtoReflect

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

func (*ResourceConfig) Reset

func (x *ResourceConfig) Reset()

func (*ResourceConfig) String

func (x *ResourceConfig) String() string

type ResourceLimits

type ResourceLimits struct {

	// CPU, in cores. (500m = .5 cores)
	// Specified in Kubernetes-style resource.Quantity form.
	Memory string `protobuf:"bytes,1,opt,name=memory,proto3" json:"memory,omitempty"`
	// Memory, in bytes. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
	// Specified in Kubernetes-style resource.Quantity form.
	Cpu string `protobuf:"bytes,2,opt,name=cpu,proto3" json:"cpu,omitempty"`
	// contains filtered or unexported fields
}

ResourceLimits configures the maximum compute resources that will be available to a Composition Function container.

func (*ResourceLimits) Descriptor deprecated

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

Deprecated: Use ResourceLimits.ProtoReflect.Descriptor instead.

func (*ResourceLimits) GetCpu

func (x *ResourceLimits) GetCpu() string

func (*ResourceLimits) GetMemory

func (x *ResourceLimits) GetMemory() string

func (*ResourceLimits) ProtoMessage

func (*ResourceLimits) ProtoMessage()

func (*ResourceLimits) ProtoReflect

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

func (*ResourceLimits) Reset

func (x *ResourceLimits) Reset()

func (*ResourceLimits) String

func (x *ResourceLimits) String() string

type RunFunctionConfig

type RunFunctionConfig struct {

	// Resources available to the container.
	Resources *ResourceConfig `protobuf:"bytes,1,opt,name=resources,proto3" json:"resources,omitempty"`
	// Network configuration for the container.
	Network *NetworkConfig `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"`
	// Timeout after which the container will be killed.
	Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

RunFunctionConfig configures how a Composition Function container is run.

func (*RunFunctionConfig) Descriptor deprecated

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

Deprecated: Use RunFunctionConfig.ProtoReflect.Descriptor instead.

func (*RunFunctionConfig) GetNetwork

func (x *RunFunctionConfig) GetNetwork() *NetworkConfig

func (*RunFunctionConfig) GetResources

func (x *RunFunctionConfig) GetResources() *ResourceConfig

func (*RunFunctionConfig) GetTimeout

func (x *RunFunctionConfig) GetTimeout() *durationpb.Duration

func (*RunFunctionConfig) ProtoMessage

func (*RunFunctionConfig) ProtoMessage()

func (*RunFunctionConfig) ProtoReflect

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

func (*RunFunctionConfig) Reset

func (x *RunFunctionConfig) Reset()

func (*RunFunctionConfig) String

func (x *RunFunctionConfig) String() string

type RunFunctionRequest

type RunFunctionRequest struct {

	// OCI image of the Composition Function.
	Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
	// A FunctionIO serialized as YAML.
	Input []byte `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"`
	// Configures how the function image is pulled.
	ImagePullConfig *ImagePullConfig `protobuf:"bytes,3,opt,name=image_pull_config,json=imagePullConfig,proto3" json:"image_pull_config,omitempty"`
	// Configures how the function container is run.
	RunFunctionConfig *RunFunctionConfig `protobuf:"bytes,4,opt,name=run_function_config,json=runFunctionConfig,proto3" json:"run_function_config,omitempty"`
	// contains filtered or unexported fields
}

A RunFunctionRequest requests that a Composition Function be run.

func (*RunFunctionRequest) Descriptor deprecated

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

Deprecated: Use RunFunctionRequest.ProtoReflect.Descriptor instead.

func (*RunFunctionRequest) GetImage

func (x *RunFunctionRequest) GetImage() string

func (*RunFunctionRequest) GetImagePullConfig

func (x *RunFunctionRequest) GetImagePullConfig() *ImagePullConfig

func (*RunFunctionRequest) GetInput

func (x *RunFunctionRequest) GetInput() []byte

func (*RunFunctionRequest) GetRunFunctionConfig

func (x *RunFunctionRequest) GetRunFunctionConfig() *RunFunctionConfig

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 {
	Output []byte `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"`
	// contains filtered or unexported fields
}

A RunFunctionResponse contains the response from a Composition Function run. The output FunctionIO is returned as opaque bytes. Errors encountered while running a function (as opposed to errors returned _by_ a function) will be encapsulated as gRPC errors.

func (*RunFunctionResponse) Descriptor deprecated

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

Deprecated: Use RunFunctionResponse.ProtoReflect.Descriptor instead.

func (*RunFunctionResponse) GetOutput

func (x *RunFunctionResponse) GetOutput() []byte

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 UnimplementedContainerizedFunctionRunnerServiceServer

type UnimplementedContainerizedFunctionRunnerServiceServer struct {
}

UnimplementedContainerizedFunctionRunnerServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedContainerizedFunctionRunnerServiceServer) RunFunction

type UnsafeContainerizedFunctionRunnerServiceServer

type UnsafeContainerizedFunctionRunnerServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeContainerizedFunctionRunnerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ContainerizedFunctionRunnerServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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