v1

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var ClustersInternalService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "llmoperator.clusters.server.v1.ClustersInternalService",
	HandlerType: (*ClustersInternalServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListInternalClusters",
			Handler:    _ClustersInternalService_ListInternalClusters_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/cluster_manager_service.proto",
}

ClustersInternalService_ServiceDesc is the grpc.ServiceDesc for ClustersInternalService 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 ClustersService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "llmoperator.clusters.server.v1.ClustersService",
	HandlerType: (*ClustersServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateCluster",
			Handler:    _ClustersService_CreateCluster_Handler,
		},
		{
			MethodName: "ListClusters",
			Handler:    _ClustersService_ListClusters_Handler,
		},
		{
			MethodName: "GetCluster",
			Handler:    _ClustersService_GetCluster_Handler,
		},
		{
			MethodName: "DeleteCluster",
			Handler:    _ClustersService_DeleteCluster_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/cluster_manager_service.proto",
}

ClustersService_ServiceDesc is the grpc.ServiceDesc for ClustersService 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 ClustersWorkerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "llmoperator.clusters.server.v1.ClustersWorkerService",
	HandlerType: (*ClustersWorkerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetSelfCluster",
			Handler:    _ClustersWorkerService_GetSelfCluster_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/cluster_manager_service.proto",
}

ClustersWorkerService_ServiceDesc is the grpc.ServiceDesc for ClustersWorkerService 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_api_v1_cluster_manager_service_proto protoreflect.FileDescriptor

Functions

func RegisterClustersInternalServiceServer

func RegisterClustersInternalServiceServer(s grpc.ServiceRegistrar, srv ClustersInternalServiceServer)

func RegisterClustersServiceHandler

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

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

func RegisterClustersServiceHandlerClient

func RegisterClustersServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ClustersServiceClient) error

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

func RegisterClustersServiceHandlerFromEndpoint

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

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

func RegisterClustersServiceHandlerServer

func RegisterClustersServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ClustersServiceServer) error

RegisterClustersServiceHandlerServer registers the http handlers for service ClustersService to "mux". UnaryRPC :call ClustersServiceServer 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 RegisterClustersServiceHandlerFromEndpoint instead.

func RegisterClustersServiceServer

func RegisterClustersServiceServer(s grpc.ServiceRegistrar, srv ClustersServiceServer)

func RegisterClustersWorkerServiceServer added in v0.9.0

func RegisterClustersWorkerServiceServer(s grpc.ServiceRegistrar, srv ClustersWorkerServiceServer)

Types

type Cluster

type Cluster struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// registration_key is the key used to register the cluster. Only populated
	// when a new cluster is created or from internal gRPC service.
	RegistrationKey string `protobuf:"bytes,3,opt,name=registration_key,json=registrationKey,proto3" json:"registration_key,omitempty"`
	Object          string `protobuf:"bytes,4,opt,name=object,proto3" json:"object,omitempty"`
	// contains filtered or unexported fields
}

func (*Cluster) Descriptor deprecated

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

Deprecated: Use Cluster.ProtoReflect.Descriptor instead.

func (*Cluster) GetId

func (x *Cluster) GetId() string

func (*Cluster) GetName

func (x *Cluster) GetName() string

func (*Cluster) GetObject

func (x *Cluster) GetObject() string

func (*Cluster) GetRegistrationKey

func (x *Cluster) GetRegistrationKey() string

func (*Cluster) ProtoMessage

func (*Cluster) ProtoMessage()

func (*Cluster) ProtoReflect

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

func (*Cluster) Reset

func (x *Cluster) Reset()

func (*Cluster) String

func (x *Cluster) String() string

type ClustersInternalServiceClient

type ClustersInternalServiceClient interface {
	ListInternalClusters(ctx context.Context, in *ListInternalClustersRequest, opts ...grpc.CallOption) (*ListInternalClustersResponse, error)
}

ClustersInternalServiceClient is the client API for ClustersInternalService 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 ClustersInternalServiceServer

type ClustersInternalServiceServer interface {
	ListInternalClusters(context.Context, *ListInternalClustersRequest) (*ListInternalClustersResponse, error)
	// contains filtered or unexported methods
}

ClustersInternalServiceServer is the server API for ClustersInternalService service. All implementations must embed UnimplementedClustersInternalServiceServer for forward compatibility

type ClustersServiceClient

type ClustersServiceClient interface {
	CreateCluster(ctx context.Context, in *CreateClusterRequest, opts ...grpc.CallOption) (*Cluster, error)
	ListClusters(ctx context.Context, in *ListClustersRequest, opts ...grpc.CallOption) (*ListClustersResponse, error)
	GetCluster(ctx context.Context, in *GetClusterRequest, opts ...grpc.CallOption) (*Cluster, error)
	DeleteCluster(ctx context.Context, in *DeleteClusterRequest, opts ...grpc.CallOption) (*DeleteClusterResponse, error)
}

ClustersServiceClient is the client API for ClustersService 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 ClustersServiceServer

type ClustersServiceServer interface {
	CreateCluster(context.Context, *CreateClusterRequest) (*Cluster, error)
	ListClusters(context.Context, *ListClustersRequest) (*ListClustersResponse, error)
	GetCluster(context.Context, *GetClusterRequest) (*Cluster, error)
	DeleteCluster(context.Context, *DeleteClusterRequest) (*DeleteClusterResponse, error)
	// contains filtered or unexported methods
}

ClustersServiceServer is the server API for ClustersService service. All implementations must embed UnimplementedClustersServiceServer for forward compatibility

type ClustersWorkerServiceClient added in v0.9.0

type ClustersWorkerServiceClient interface {
	// GetSelfCluster returns the cluster to which the worker cluster itself belongs.
	GetSelfCluster(ctx context.Context, in *GetSelfClusterRequest, opts ...grpc.CallOption) (*Cluster, error)
}

ClustersWorkerServiceClient is the client API for ClustersWorkerService 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.

func NewClustersWorkerServiceClient added in v0.9.0

func NewClustersWorkerServiceClient(cc grpc.ClientConnInterface) ClustersWorkerServiceClient

type ClustersWorkerServiceServer added in v0.9.0

type ClustersWorkerServiceServer interface {
	// GetSelfCluster returns the cluster to which the worker cluster itself belongs.
	GetSelfCluster(context.Context, *GetSelfClusterRequest) (*Cluster, error)
	// contains filtered or unexported methods
}

ClustersWorkerServiceServer is the server API for ClustersWorkerService service. All implementations must embed UnimplementedClustersWorkerServiceServer for forward compatibility

type CreateClusterRequest

type CreateClusterRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateClusterRequest) Descriptor deprecated

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

Deprecated: Use CreateClusterRequest.ProtoReflect.Descriptor instead.

func (*CreateClusterRequest) GetName

func (x *CreateClusterRequest) GetName() string

func (*CreateClusterRequest) ProtoMessage

func (*CreateClusterRequest) ProtoMessage()

func (*CreateClusterRequest) ProtoReflect

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

func (*CreateClusterRequest) Reset

func (x *CreateClusterRequest) Reset()

func (*CreateClusterRequest) String

func (x *CreateClusterRequest) String() string

type DeleteClusterRequest

type DeleteClusterRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteClusterRequest) Descriptor deprecated

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

Deprecated: Use DeleteClusterRequest.ProtoReflect.Descriptor instead.

func (*DeleteClusterRequest) GetId

func (x *DeleteClusterRequest) GetId() string

func (*DeleteClusterRequest) ProtoMessage

func (*DeleteClusterRequest) ProtoMessage()

func (*DeleteClusterRequest) ProtoReflect

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

func (*DeleteClusterRequest) Reset

func (x *DeleteClusterRequest) Reset()

func (*DeleteClusterRequest) String

func (x *DeleteClusterRequest) String() string

type DeleteClusterResponse

type DeleteClusterResponse struct {
	Id      string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Object  string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
	Deleted bool   `protobuf:"varint,3,opt,name=deleted,proto3" json:"deleted,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteClusterResponse) Descriptor deprecated

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

Deprecated: Use DeleteClusterResponse.ProtoReflect.Descriptor instead.

func (*DeleteClusterResponse) GetDeleted

func (x *DeleteClusterResponse) GetDeleted() bool

func (*DeleteClusterResponse) GetId

func (x *DeleteClusterResponse) GetId() string

func (*DeleteClusterResponse) GetObject

func (x *DeleteClusterResponse) GetObject() string

func (*DeleteClusterResponse) ProtoMessage

func (*DeleteClusterResponse) ProtoMessage()

func (*DeleteClusterResponse) ProtoReflect

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

func (*DeleteClusterResponse) Reset

func (x *DeleteClusterResponse) Reset()

func (*DeleteClusterResponse) String

func (x *DeleteClusterResponse) String() string

type GetClusterRequest

type GetClusterRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetClusterRequest) Descriptor deprecated

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

Deprecated: Use GetClusterRequest.ProtoReflect.Descriptor instead.

func (*GetClusterRequest) GetId

func (x *GetClusterRequest) GetId() string

func (*GetClusterRequest) ProtoMessage

func (*GetClusterRequest) ProtoMessage()

func (*GetClusterRequest) ProtoReflect

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

func (*GetClusterRequest) Reset

func (x *GetClusterRequest) Reset()

func (*GetClusterRequest) String

func (x *GetClusterRequest) String() string

type GetSelfClusterRequest added in v0.9.0

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

func (*GetSelfClusterRequest) Descriptor deprecated added in v0.9.0

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

Deprecated: Use GetSelfClusterRequest.ProtoReflect.Descriptor instead.

func (*GetSelfClusterRequest) ProtoMessage added in v0.9.0

func (*GetSelfClusterRequest) ProtoMessage()

func (*GetSelfClusterRequest) ProtoReflect added in v0.9.0

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

func (*GetSelfClusterRequest) Reset added in v0.9.0

func (x *GetSelfClusterRequest) Reset()

func (*GetSelfClusterRequest) String added in v0.9.0

func (x *GetSelfClusterRequest) String() string

type InternalCluster added in v0.4.0

type InternalCluster struct {
	Cluster  *Cluster `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"`
	TenantId string   `protobuf:"bytes,2,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
	// contains filtered or unexported fields
}

func (*InternalCluster) Descriptor deprecated added in v0.4.0

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

Deprecated: Use InternalCluster.ProtoReflect.Descriptor instead.

func (*InternalCluster) GetCluster added in v0.4.0

func (x *InternalCluster) GetCluster() *Cluster

func (*InternalCluster) GetTenantId added in v0.4.0

func (x *InternalCluster) GetTenantId() string

func (*InternalCluster) ProtoMessage added in v0.4.0

func (*InternalCluster) ProtoMessage()

func (*InternalCluster) ProtoReflect added in v0.4.0

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

func (*InternalCluster) Reset added in v0.4.0

func (x *InternalCluster) Reset()

func (*InternalCluster) String added in v0.4.0

func (x *InternalCluster) String() string

type ListClustersRequest

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

func (*ListClustersRequest) Descriptor deprecated

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

Deprecated: Use ListClustersRequest.ProtoReflect.Descriptor instead.

func (*ListClustersRequest) ProtoMessage

func (*ListClustersRequest) ProtoMessage()

func (*ListClustersRequest) ProtoReflect

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

func (*ListClustersRequest) Reset

func (x *ListClustersRequest) Reset()

func (*ListClustersRequest) String

func (x *ListClustersRequest) String() string

type ListClustersResponse

type ListClustersResponse struct {
	Object string     `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"`
	Data   []*Cluster `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*ListClustersResponse) Descriptor deprecated

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

Deprecated: Use ListClustersResponse.ProtoReflect.Descriptor instead.

func (*ListClustersResponse) GetData

func (x *ListClustersResponse) GetData() []*Cluster

func (*ListClustersResponse) GetObject

func (x *ListClustersResponse) GetObject() string

func (*ListClustersResponse) ProtoMessage

func (*ListClustersResponse) ProtoMessage()

func (*ListClustersResponse) ProtoReflect

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

func (*ListClustersResponse) Reset

func (x *ListClustersResponse) Reset()

func (*ListClustersResponse) String

func (x *ListClustersResponse) String() string

type ListInternalClustersRequest added in v0.4.0

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

func (*ListInternalClustersRequest) Descriptor deprecated added in v0.4.0

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

Deprecated: Use ListInternalClustersRequest.ProtoReflect.Descriptor instead.

func (*ListInternalClustersRequest) ProtoMessage added in v0.4.0

func (*ListInternalClustersRequest) ProtoMessage()

func (*ListInternalClustersRequest) ProtoReflect added in v0.4.0

func (*ListInternalClustersRequest) Reset added in v0.4.0

func (x *ListInternalClustersRequest) Reset()

func (*ListInternalClustersRequest) String added in v0.4.0

func (x *ListInternalClustersRequest) String() string

type ListInternalClustersResponse added in v0.4.0

type ListInternalClustersResponse struct {
	Clusters []*InternalCluster `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"`
	// contains filtered or unexported fields
}

func (*ListInternalClustersResponse) Descriptor deprecated added in v0.4.0

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

Deprecated: Use ListInternalClustersResponse.ProtoReflect.Descriptor instead.

func (*ListInternalClustersResponse) GetClusters added in v0.4.0

func (x *ListInternalClustersResponse) GetClusters() []*InternalCluster

func (*ListInternalClustersResponse) ProtoMessage added in v0.4.0

func (*ListInternalClustersResponse) ProtoMessage()

func (*ListInternalClustersResponse) ProtoReflect added in v0.4.0

func (*ListInternalClustersResponse) Reset added in v0.4.0

func (x *ListInternalClustersResponse) Reset()

func (*ListInternalClustersResponse) String added in v0.4.0

type UnimplementedClustersInternalServiceServer

type UnimplementedClustersInternalServiceServer struct {
}

UnimplementedClustersInternalServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedClustersInternalServiceServer) ListInternalClusters added in v0.4.0

type UnimplementedClustersServiceServer

type UnimplementedClustersServiceServer struct {
}

UnimplementedClustersServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedClustersServiceServer) CreateCluster

func (UnimplementedClustersServiceServer) DeleteCluster

func (UnimplementedClustersServiceServer) GetCluster

func (UnimplementedClustersServiceServer) ListClusters

type UnimplementedClustersWorkerServiceServer added in v0.9.0

type UnimplementedClustersWorkerServiceServer struct {
}

UnimplementedClustersWorkerServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedClustersWorkerServiceServer) GetSelfCluster added in v0.9.0

type UnsafeClustersInternalServiceServer

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

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

type UnsafeClustersServiceServer

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

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

type UnsafeClustersWorkerServiceServer added in v0.9.0

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

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

Jump to

Keyboard shortcuts

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