pb

package
v0.0.0-...-a1b4a84 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package pb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	FunctionService_ListFunctions_FullMethodName  = "/cqless.v1.function.FunctionService/ListFunctions"
	FunctionService_GetFunction_FullMethodName    = "/cqless.v1.function.FunctionService/GetFunction"
	FunctionService_CreateFunction_FullMethodName = "/cqless.v1.function.FunctionService/CreateFunction"
	FunctionService_UpdateFunction_FullMethodName = "/cqless.v1.function.FunctionService/UpdateFunction"
	FunctionService_DeleteFunction_FullMethodName = "/cqless.v1.function.FunctionService/DeleteFunction"
)

Variables

View Source
var File_pb_core_function_proto protoreflect.FileDescriptor
View Source
var File_pb_core_node_proto protoreflect.FileDescriptor
View Source
var FunctionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cqless.v1.function.FunctionService",
	HandlerType: (*FunctionServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListFunctions",
			Handler:    _FunctionService_ListFunctions_Handler,
		},
		{
			MethodName: "GetFunction",
			Handler:    _FunctionService_GetFunction_Handler,
		},
		{
			MethodName: "CreateFunction",
			Handler:    _FunctionService_CreateFunction_Handler,
		},
		{
			MethodName: "UpdateFunction",
			Handler:    _FunctionService_UpdateFunction_Handler,
		},
		{
			MethodName: "DeleteFunction",
			Handler:    _FunctionService_DeleteFunction_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pb/core/function.proto",
}

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

Functions

func RegisterFunctionServiceHandler

func RegisterFunctionServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterFunctionServiceHandler registers the http handlers for service FunctionService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterFunctionServiceHandlerClient

func RegisterFunctionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FunctionServiceClient) error

RegisterFunctionServiceHandlerClient registers the http handlers for service FunctionService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "FunctionServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "FunctionServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "FunctionServiceClient" to call the correct interceptors.

func RegisterFunctionServiceHandlerFromEndpoint

func RegisterFunctionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterFunctionServiceHandlerFromEndpoint is same as RegisterFunctionServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterFunctionServiceHandlerServer

func RegisterFunctionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FunctionServiceServer) error

RegisterFunctionServiceHandlerServer registers the http handlers for service FunctionService to "mux". UnaryRPC :call FunctionServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterFunctionServiceHandlerFromEndpoint instead.

func RegisterFunctionServiceServer

func RegisterFunctionServiceServer(s grpc.ServiceRegistrar, srv FunctionServiceServer)

Types

type CreateFunctionRequest

type CreateFunctionRequest struct {

	// The parent resource name where the function is to be created.
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// The function id to use for this function.
	FunctionId string `protobuf:"bytes,2,opt,name=function_id,json=functionId,proto3" json:"function_id,omitempty"`
	// The function resource to create.
	// The field name should match the Noun in the method name.
	Function *Function `protobuf:"bytes,3,opt,name=function,proto3" json:"function,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateFunctionRequest) Descriptor deprecated

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

Deprecated: Use CreateFunctionRequest.ProtoReflect.Descriptor instead.

func (*CreateFunctionRequest) GetFunction

func (x *CreateFunctionRequest) GetFunction() *Function

func (*CreateFunctionRequest) GetFunctionId

func (x *CreateFunctionRequest) GetFunctionId() string

func (*CreateFunctionRequest) GetParent

func (x *CreateFunctionRequest) GetParent() string

func (*CreateFunctionRequest) ProtoMessage

func (*CreateFunctionRequest) ProtoMessage()

func (*CreateFunctionRequest) ProtoReflect

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

func (*CreateFunctionRequest) Reset

func (x *CreateFunctionRequest) Reset()

func (*CreateFunctionRequest) String

func (x *CreateFunctionRequest) String() string

type DeleteFunctionRequest

type DeleteFunctionRequest struct {

	// The resource name of the function to be deleted.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteFunctionRequest) Descriptor deprecated

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

Deprecated: Use DeleteFunctionRequest.ProtoReflect.Descriptor instead.

func (*DeleteFunctionRequest) GetName

func (x *DeleteFunctionRequest) GetName() string

func (*DeleteFunctionRequest) ProtoMessage

func (*DeleteFunctionRequest) ProtoMessage()

func (*DeleteFunctionRequest) ProtoReflect

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

func (*DeleteFunctionRequest) Reset

func (x *DeleteFunctionRequest) Reset()

func (*DeleteFunctionRequest) String

func (x *DeleteFunctionRequest) String() string

type Function

type Function struct {
	Id           string             `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Pid          int64              `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`
	Name         string             `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	FullName     string             `protobuf:"bytes,4,opt,name=fullName,proto3" json:"fullName,omitempty"`
	Status       string             `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
	Image        string             `protobuf:"bytes,6,opt,name=image,proto3" json:"image,omitempty"`
	Namespace    string             `protobuf:"bytes,7,opt,name=namespace,proto3" json:"namespace,omitempty"`
	IpAddress    string             `protobuf:"bytes,8,opt,name=ipAddress,proto3" json:"ipAddress,omitempty"`
	WatchDogPort string             `protobuf:"bytes,9,opt,name=watchDogPort,proto3" json:"watchDogPort,omitempty"`
	Scheme       string             `protobuf:"bytes,10,opt,name=scheme,proto3" json:"scheme,omitempty"`
	Labels       map[string]string  `` /* 154-byte string literal not displayed */
	Envs         map[string]string  `` /* 150-byte string literal not displayed */
	Metadata     map[string]string  `` /* 158-byte string literal not displayed */
	Constraints  []string           `protobuf:"bytes,14,rep,name=constraints,proto3" json:"constraints,omitempty"`
	Secrets      []string           `protobuf:"bytes,15,rep,name=secrets,proto3" json:"secrets,omitempty"`
	Limits       *FunctionResources `protobuf:"bytes,16,opt,name=limits,proto3" json:"limits,omitempty"`
	// contains filtered or unexported fields
}

func (*Function) Descriptor deprecated

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

Deprecated: Use Function.ProtoReflect.Descriptor instead.

func (*Function) GetConstraints

func (x *Function) GetConstraints() []string

func (*Function) GetEnvs

func (x *Function) GetEnvs() map[string]string

func (*Function) GetFullName

func (x *Function) GetFullName() string

func (*Function) GetId

func (x *Function) GetId() string

func (*Function) GetImage

func (x *Function) GetImage() string

func (*Function) GetIpAddress

func (x *Function) GetIpAddress() string

func (*Function) GetLabels

func (x *Function) GetLabels() map[string]string

func (*Function) GetLimits

func (x *Function) GetLimits() *FunctionResources

func (*Function) GetMetadata

func (x *Function) GetMetadata() map[string]string

func (*Function) GetName

func (x *Function) GetName() string

func (*Function) GetNamespace

func (x *Function) GetNamespace() string

func (*Function) GetPid

func (x *Function) GetPid() int64

func (*Function) GetScheme

func (x *Function) GetScheme() string

func (*Function) GetSecrets

func (x *Function) GetSecrets() []string

func (*Function) GetStatus

func (x *Function) GetStatus() string

func (*Function) GetWatchDogPort

func (x *Function) GetWatchDogPort() string

func (*Function) ProtoMessage

func (*Function) ProtoMessage()

func (*Function) ProtoReflect

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

func (*Function) Reset

func (x *Function) Reset()

func (*Function) String

func (x *Function) String() string

type FunctionResources

type FunctionResources struct {
	Memory string `protobuf:"bytes,1,opt,name=memory,proto3" json:"memory,omitempty"`
	Cpu    string `protobuf:"bytes,2,opt,name=cpu,proto3" json:"cpu,omitempty"`
	// contains filtered or unexported fields
}

func (*FunctionResources) Descriptor deprecated

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

Deprecated: Use FunctionResources.ProtoReflect.Descriptor instead.

func (*FunctionResources) GetCpu

func (x *FunctionResources) GetCpu() string

func (*FunctionResources) GetMemory

func (x *FunctionResources) GetMemory() string

func (*FunctionResources) ProtoMessage

func (*FunctionResources) ProtoMessage()

func (*FunctionResources) ProtoReflect

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

func (*FunctionResources) Reset

func (x *FunctionResources) Reset()

func (*FunctionResources) String

func (x *FunctionResources) String() string

type FunctionServiceClient

type FunctionServiceClient interface {
	ListFunctions(ctx context.Context, in *ListFunctionsRequest, opts ...grpc.CallOption) (*ListFunctionsResponse, error)
	GetFunction(ctx context.Context, in *GetFunctionRequest, opts ...grpc.CallOption) (*ListFunctionsResponse, error)
	CreateFunction(ctx context.Context, in *CreateFunctionRequest, opts ...grpc.CallOption) (*Function, error)
	UpdateFunction(ctx context.Context, in *UpdateFunctionRequest, opts ...grpc.CallOption) (*Function, error)
	DeleteFunction(ctx context.Context, in *DeleteFunctionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

FunctionServiceClient is the client API for FunctionService 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 FunctionServiceServer

type FunctionServiceServer interface {
	ListFunctions(context.Context, *ListFunctionsRequest) (*ListFunctionsResponse, error)
	GetFunction(context.Context, *GetFunctionRequest) (*ListFunctionsResponse, error)
	CreateFunction(context.Context, *CreateFunctionRequest) (*Function, error)
	UpdateFunction(context.Context, *UpdateFunctionRequest) (*Function, error)
	DeleteFunction(context.Context, *DeleteFunctionRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

FunctionServiceServer is the server API for FunctionService service. All implementations must embed UnimplementedFunctionServiceServer for forward compatibility

type GetFunctionRequest

type GetFunctionRequest struct {

	// The field will contain name of the resource requested.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*GetFunctionRequest) Descriptor deprecated

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

Deprecated: Use GetFunctionRequest.ProtoReflect.Descriptor instead.

func (*GetFunctionRequest) GetName

func (x *GetFunctionRequest) GetName() string

func (*GetFunctionRequest) ProtoMessage

func (*GetFunctionRequest) ProtoMessage()

func (*GetFunctionRequest) ProtoReflect

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

func (*GetFunctionRequest) Reset

func (x *GetFunctionRequest) Reset()

func (*GetFunctionRequest) String

func (x *GetFunctionRequest) String() string

type ListFunctionsRequest

type ListFunctionsRequest struct {

	// The parent resource name, for example, "shelves/shelf1"
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// The maximum number of items to return.
	PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// The next_page_token value returned from a previous List request, if any.
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

func (*ListFunctionsRequest) Descriptor deprecated

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

Deprecated: Use ListFunctionsRequest.ProtoReflect.Descriptor instead.

func (*ListFunctionsRequest) GetPageSize

func (x *ListFunctionsRequest) GetPageSize() int32

func (*ListFunctionsRequest) GetPageToken

func (x *ListFunctionsRequest) GetPageToken() string

func (*ListFunctionsRequest) GetParent

func (x *ListFunctionsRequest) GetParent() string

func (*ListFunctionsRequest) ProtoMessage

func (*ListFunctionsRequest) ProtoMessage()

func (*ListFunctionsRequest) ProtoReflect

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

func (*ListFunctionsRequest) Reset

func (x *ListFunctionsRequest) Reset()

func (*ListFunctionsRequest) String

func (x *ListFunctionsRequest) String() string

type ListFunctionsResponse

type ListFunctionsResponse struct {

	// The field name should match the noun "function" in the method name.
	// There will be a maximum number of items returned based on the
	// page_size field in the request.
	Functions []*Function `protobuf:"bytes,1,rep,name=functions,proto3" json:"functions,omitempty"`
	// Token to retrieve the next page of results, or empty if there are
	// no more results in the list.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

func (*ListFunctionsResponse) Descriptor deprecated

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

Deprecated: Use ListFunctionsResponse.ProtoReflect.Descriptor instead.

func (*ListFunctionsResponse) GetFunctions

func (x *ListFunctionsResponse) GetFunctions() []*Function

func (*ListFunctionsResponse) GetNextPageToken

func (x *ListFunctionsResponse) GetNextPageToken() string

func (*ListFunctionsResponse) ProtoMessage

func (*ListFunctionsResponse) ProtoMessage()

func (*ListFunctionsResponse) ProtoReflect

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

func (*ListFunctionsResponse) Reset

func (x *ListFunctionsResponse) Reset()

func (*ListFunctionsResponse) String

func (x *ListFunctionsResponse) String() string

type Node

type Node struct {
	// contains filtered or unexported fields
}

func (*Node) Descriptor deprecated

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

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect

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

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

type UnimplementedFunctionServiceServer

type UnimplementedFunctionServiceServer struct {
}

UnimplementedFunctionServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedFunctionServiceServer) CreateFunction

func (UnimplementedFunctionServiceServer) DeleteFunction

func (UnimplementedFunctionServiceServer) GetFunction

func (UnimplementedFunctionServiceServer) ListFunctions

func (UnimplementedFunctionServiceServer) UpdateFunction

type UnsafeFunctionServiceServer

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

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

type UpdateFunctionRequest

type UpdateFunctionRequest struct {

	// The function resource which replaces the resource on the server.
	Function *Function `protobuf:"bytes,1,opt,name=function,proto3" json:"function,omitempty"`
	// The update mask applies to the resource. For the `FieldMask` definition,
	UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateFunctionRequest) Descriptor deprecated

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

Deprecated: Use UpdateFunctionRequest.ProtoReflect.Descriptor instead.

func (*UpdateFunctionRequest) GetFunction

func (x *UpdateFunctionRequest) GetFunction() *Function

func (*UpdateFunctionRequest) GetUpdateMask

func (x *UpdateFunctionRequest) GetUpdateMask() *fieldmaskpb.FieldMask

func (*UpdateFunctionRequest) ProtoMessage

func (*UpdateFunctionRequest) ProtoMessage()

func (*UpdateFunctionRequest) ProtoReflect

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

func (*UpdateFunctionRequest) Reset

func (x *UpdateFunctionRequest) Reset()

func (*UpdateFunctionRequest) String

func (x *UpdateFunctionRequest) String() string

Jump to

Keyboard shortcuts

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