v1

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 17 Imported by: 1

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: "llmariner.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: "llmariner.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: "llmariner.clusters.server.v1.ClustersWorkerService",
	HandlerType: (*ClustersWorkerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetSelfCluster",
			Handler:    _ClustersWorkerService_GetSelfCluster_Handler,
		},
		{
			MethodName: "UpdateComponentStatus",
			Handler:    _ClustersWorkerService_UpdateComponentStatus_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

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"`
	// components_statuses is keyed by component name.
	ComponentStatuses map[string]*ComponentStatus `` /* 200-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Cluster) Descriptor deprecated

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

Deprecated: Use Cluster.ProtoReflect.Descriptor instead.

func (*Cluster) GetComponentStatuses added in v1.5.2

func (x *Cluster) GetComponentStatuses() map[string]*ComponentStatus

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

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)
	// UpdateComponentStatus updates the component's health status to the cluster.
	UpdateComponentStatus(ctx context.Context, in *UpdateComponentStatusRequest, opts ...grpc.CallOption) (*emptypb.Empty, 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.

type ClustersWorkerServiceServer

type ClustersWorkerServiceServer interface {
	// GetSelfCluster returns the cluster to which the worker cluster itself belongs.
	GetSelfCluster(context.Context, *GetSelfClusterRequest) (*Cluster, error)
	// UpdateComponentStatus updates the component's health status to the cluster.
	UpdateComponentStatus(context.Context, *UpdateComponentStatusRequest) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

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

type ComponentStatus added in v1.3.0

type ComponentStatus struct {
	IsHealthy bool   `protobuf:"varint,1,opt,name=is_healthy,json=isHealthy,proto3" json:"is_healthy,omitempty"`
	Message   string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*ComponentStatus) Descriptor deprecated added in v1.3.0

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

Deprecated: Use ComponentStatus.ProtoReflect.Descriptor instead.

func (*ComponentStatus) GetIsHealthy added in v1.3.0

func (x *ComponentStatus) GetIsHealthy() bool

func (*ComponentStatus) GetMessage added in v1.3.0

func (x *ComponentStatus) GetMessage() string

func (*ComponentStatus) ProtoMessage added in v1.3.0

func (*ComponentStatus) ProtoMessage()

func (*ComponentStatus) ProtoReflect added in v1.3.0

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

func (*ComponentStatus) Reset added in v1.3.0

func (x *ComponentStatus) Reset()

func (*ComponentStatus) String added in v1.3.0

func (x *ComponentStatus) String() string

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

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

func (*GetSelfClusterRequest) Descriptor deprecated

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

Deprecated: Use GetSelfClusterRequest.ProtoReflect.Descriptor instead.

func (*GetSelfClusterRequest) ProtoMessage

func (*GetSelfClusterRequest) ProtoMessage()

func (*GetSelfClusterRequest) ProtoReflect

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

func (*GetSelfClusterRequest) Reset

func (x *GetSelfClusterRequest) Reset()

func (*GetSelfClusterRequest) String

func (x *GetSelfClusterRequest) String() string

type InternalCluster

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

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

Deprecated: Use InternalCluster.ProtoReflect.Descriptor instead.

func (*InternalCluster) GetCluster

func (x *InternalCluster) GetCluster() *Cluster

func (*InternalCluster) GetTenantId

func (x *InternalCluster) GetTenantId() string

func (*InternalCluster) ProtoMessage

func (*InternalCluster) ProtoMessage()

func (*InternalCluster) ProtoReflect

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

func (*InternalCluster) Reset

func (x *InternalCluster) Reset()

func (*InternalCluster) String

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

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

func (*ListInternalClustersRequest) Descriptor deprecated

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

Deprecated: Use ListInternalClustersRequest.ProtoReflect.Descriptor instead.

func (*ListInternalClustersRequest) ProtoMessage

func (*ListInternalClustersRequest) ProtoMessage()

func (*ListInternalClustersRequest) ProtoReflect

func (*ListInternalClustersRequest) Reset

func (x *ListInternalClustersRequest) Reset()

func (*ListInternalClustersRequest) String

func (x *ListInternalClustersRequest) String() string

type ListInternalClustersResponse

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

func (*ListInternalClustersResponse) Descriptor deprecated

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

Deprecated: Use ListInternalClustersResponse.ProtoReflect.Descriptor instead.

func (*ListInternalClustersResponse) GetClusters

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

func (*ListInternalClustersResponse) ProtoMessage

func (*ListInternalClustersResponse) ProtoMessage()

func (*ListInternalClustersResponse) ProtoReflect

func (*ListInternalClustersResponse) Reset

func (x *ListInternalClustersResponse) Reset()

func (*ListInternalClustersResponse) String

type UnimplementedClustersInternalServiceServer

type UnimplementedClustersInternalServiceServer struct {
}

UnimplementedClustersInternalServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedClustersInternalServiceServer) ListInternalClusters

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

type UnimplementedClustersWorkerServiceServer struct {
}

UnimplementedClustersWorkerServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedClustersWorkerServiceServer) GetSelfCluster

func (UnimplementedClustersWorkerServiceServer) UpdateComponentStatus added in v1.3.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

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.

type UpdateComponentStatusRequest added in v1.3.0

type UpdateComponentStatusRequest struct {
	Name   string           `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Status *ComponentStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateComponentStatusRequest) Descriptor deprecated added in v1.3.0

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

Deprecated: Use UpdateComponentStatusRequest.ProtoReflect.Descriptor instead.

func (*UpdateComponentStatusRequest) GetName added in v1.3.0

func (x *UpdateComponentStatusRequest) GetName() string

func (*UpdateComponentStatusRequest) GetStatus added in v1.3.0

func (*UpdateComponentStatusRequest) ProtoMessage added in v1.3.0

func (*UpdateComponentStatusRequest) ProtoMessage()

func (*UpdateComponentStatusRequest) ProtoReflect added in v1.3.0

func (*UpdateComponentStatusRequest) Reset added in v1.3.0

func (x *UpdateComponentStatusRequest) Reset()

func (*UpdateComponentStatusRequest) String added in v1.3.0

Jump to

Keyboard shortcuts

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