cluster

package
v0.0.0-...-24bc511 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ClusterType_name = map[int32]string{
		0: "CLUSTER_TYPE_UNSPECIFIED",
		1: "CLUSTER_TYPE_DOCKER",
		2: "CLUSTER_TYPE_KUBERNETES",
	}
	ClusterType_value = map[string]int32{
		"CLUSTER_TYPE_UNSPECIFIED": 0,
		"CLUSTER_TYPE_DOCKER":      1,
		"CLUSTER_TYPE_KUBERNETES":  2,
	}
)

Enum value maps for ClusterType.

View Source
var File_api_v1_cluster_cluster_proto protoreflect.FileDescriptor
View Source
var File_api_v1_cluster_service_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.v1.cluster.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "List",
			Handler:    _Service_List_Handler,
		},
		{
			MethodName: "GetConfig",
			Handler:    _Service_GetConfig_Handler,
		},
		{
			MethodName: "GetConfigs",
			Handler:    _Service_GetConfigs_Handler,
		},
		{
			MethodName: "ListNodePods",
			Handler:    _Service_ListNodePods_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/cluster/service.proto",
}

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

Functions

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type Cluster

type Cluster struct {

	// ID of the cluster.
	ClusterId       string                   `protobuf:"bytes,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
	OperatorConfig  *v1alpha1.OperatorConfig `protobuf:"bytes,2,opt,name=operator_config,json=operatorConfig,proto3" json:"operator_config,omitempty"`
	OperatorVersion string                   `protobuf:"bytes,3,opt,name=operator_version,json=operatorVersion,proto3" json:"operator_version,omitempty"`
	// contains filtered or unexported fields
}

Cluster model.

func (*Cluster) Descriptor deprecated

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

Deprecated: Use Cluster.ProtoReflect.Descriptor instead.

func (*Cluster) GetClusterId

func (x *Cluster) GetClusterId() string

func (*Cluster) GetOperatorConfig

func (x *Cluster) GetOperatorConfig() *v1alpha1.OperatorConfig

func (*Cluster) GetOperatorVersion

func (x *Cluster) GetOperatorVersion() 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 ClusterType

type ClusterType int32

Cluster type - Docker or kubernetes.

const (
	ClusterType_CLUSTER_TYPE_UNSPECIFIED ClusterType = 0
	ClusterType_CLUSTER_TYPE_DOCKER      ClusterType = 1
	ClusterType_CLUSTER_TYPE_KUBERNETES  ClusterType = 2
)

func (ClusterType) Descriptor

func (ClusterType) Enum

func (x ClusterType) Enum() *ClusterType

func (ClusterType) EnumDescriptor deprecated

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

Deprecated: Use ClusterType.Descriptor instead.

func (ClusterType) Number

func (x ClusterType) Number() protoreflect.EnumNumber

func (ClusterType) String

func (x ClusterType) String() string

func (ClusterType) Type

type DockerDaemon

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

Docker daemon dev registry

func (*DockerDaemon) Descriptor deprecated

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

Deprecated: Use DockerDaemon.ProtoReflect.Descriptor instead.

func (*DockerDaemon) ProtoMessage

func (*DockerDaemon) ProtoMessage()

func (*DockerDaemon) ProtoReflect

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

func (*DockerDaemon) Reset

func (x *DockerDaemon) Reset()

func (*DockerDaemon) String

func (x *DockerDaemon) String() string

type GetConfigRequest

type GetConfigRequest struct {

	// The environment to get cluster config for.
	EnvironmentId string `protobuf:"bytes,1,opt,name=environment_id,json=environmentId,proto3" json:"environment_id,omitempty"`
	// contains filtered or unexported fields
}

request for getting cluster config for an environment.

func (*GetConfigRequest) Descriptor deprecated

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

Deprecated: Use GetConfigRequest.ProtoReflect.Descriptor instead.

func (*GetConfigRequest) GetEnvironmentId

func (x *GetConfigRequest) GetEnvironmentId() string

func (*GetConfigRequest) ProtoMessage

func (*GetConfigRequest) ProtoMessage()

func (*GetConfigRequest) ProtoReflect

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

func (*GetConfigRequest) Reset

func (x *GetConfigRequest) Reset()

func (*GetConfigRequest) String

func (x *GetConfigRequest) String() string

type GetConfigResponse

type GetConfigResponse struct {

	// Type of the cluster.
	ClusterType ClusterType `` /* 127-byte string literal not displayed */
	// dev registry of the cluster. This is either a Docker daemon or a registry.
	//
	// Types that are assignable to DevRegistry:
	//
	//	*GetConfigResponse_Docker
	//	*GetConfigResponse_Registry
	DevRegistry isGetConfigResponse_DevRegistry `protobuf_oneof:"dev_registry"`
	// if true, the cluster has an ingress controller.
	Ingress bool `protobuf:"varint,4,opt,name=ingress,proto3" json:"ingress,omitempty"`
	// contains filtered or unexported fields
}

response for getting cluster config for an environment.

func (*GetConfigResponse) Descriptor deprecated

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

Deprecated: Use GetConfigResponse.ProtoReflect.Descriptor instead.

func (*GetConfigResponse) GetClusterType

func (x *GetConfigResponse) GetClusterType() ClusterType

func (*GetConfigResponse) GetDevRegistry

func (m *GetConfigResponse) GetDevRegistry() isGetConfigResponse_DevRegistry

func (*GetConfigResponse) GetDocker

func (x *GetConfigResponse) GetDocker() *DockerDaemon

func (*GetConfigResponse) GetIngress

func (x *GetConfigResponse) GetIngress() bool

func (*GetConfigResponse) GetRegistry

func (x *GetConfigResponse) GetRegistry() *Registry

func (*GetConfigResponse) ProtoMessage

func (*GetConfigResponse) ProtoMessage()

func (*GetConfigResponse) ProtoReflect

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

func (*GetConfigResponse) Reset

func (x *GetConfigResponse) Reset()

func (*GetConfigResponse) String

func (x *GetConfigResponse) String() string

type GetConfigResponse_Docker

type GetConfigResponse_Docker struct {
	// Docker.
	Docker *DockerDaemon `protobuf:"bytes,2,opt,name=docker,proto3,oneof"`
}

type GetConfigResponse_Registry

type GetConfigResponse_Registry struct {
	// Registry.
	Registry *Registry `protobuf:"bytes,3,opt,name=registry,proto3,oneof"`
}

type GetConfigsRequest

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

Empty Request for getting the configs of all clusters.

func (*GetConfigsRequest) Descriptor deprecated

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

Deprecated: Use GetConfigsRequest.ProtoReflect.Descriptor instead.

func (*GetConfigsRequest) ProtoMessage

func (*GetConfigsRequest) ProtoMessage()

func (*GetConfigsRequest) ProtoReflect

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

func (*GetConfigsRequest) Reset

func (x *GetConfigsRequest) Reset()

func (*GetConfigsRequest) String

func (x *GetConfigsRequest) String() string

type GetConfigsResponse

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

Empty Response for getting the configs of all clusters.

func (*GetConfigsResponse) Descriptor deprecated

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

Deprecated: Use GetConfigsResponse.ProtoReflect.Descriptor instead.

func (*GetConfigsResponse) GetClusters

func (x *GetConfigsResponse) GetClusters() []*GetConfigResponse

func (*GetConfigsResponse) ProtoMessage

func (*GetConfigsResponse) ProtoMessage()

func (*GetConfigsResponse) ProtoReflect

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

func (*GetConfigsResponse) Reset

func (x *GetConfigsResponse) Reset()

func (*GetConfigsResponse) String

func (x *GetConfigsResponse) String() string

type ListNodePodsRequest

type ListNodePodsRequest struct {
	ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"`
	NodeName    string `protobuf:"bytes,2,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"`
	// contains filtered or unexported fields
}

func (*ListNodePodsRequest) Descriptor deprecated

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

Deprecated: Use ListNodePodsRequest.ProtoReflect.Descriptor instead.

func (*ListNodePodsRequest) GetClusterName

func (x *ListNodePodsRequest) GetClusterName() string

func (*ListNodePodsRequest) GetNodeName

func (x *ListNodePodsRequest) GetNodeName() string

func (*ListNodePodsRequest) ProtoMessage

func (*ListNodePodsRequest) ProtoMessage()

func (*ListNodePodsRequest) ProtoReflect

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

func (*ListNodePodsRequest) Reset

func (x *ListNodePodsRequest) Reset()

func (*ListNodePodsRequest) String

func (x *ListNodePodsRequest) String() string

type ListNodePodsResponse

type ListNodePodsResponse struct {
	Pods []*Pod `protobuf:"bytes,1,rep,name=pods,proto3" json:"pods,omitempty"`
	// contains filtered or unexported fields
}

func (*ListNodePodsResponse) Descriptor deprecated

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

Deprecated: Use ListNodePodsResponse.ProtoReflect.Descriptor instead.

func (*ListNodePodsResponse) GetPods

func (x *ListNodePodsResponse) GetPods() []*Pod

func (*ListNodePodsResponse) ProtoMessage

func (*ListNodePodsResponse) ProtoMessage()

func (*ListNodePodsResponse) ProtoReflect

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

func (*ListNodePodsResponse) Reset

func (x *ListNodePodsResponse) Reset()

func (*ListNodePodsResponse) String

func (x *ListNodePodsResponse) String() string

type ListRequest

type ListRequest struct {

	// Pagination options.
	Pagination *model.Pagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
	// contains filtered or unexported fields
}

Request for listing available clusters.

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetPagination

func (x *ListRequest) GetPagination() *model.Pagination

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

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

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

type ListResponse

type ListResponse struct {

	// List of clusters.
	Clusters []*Cluster `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"`
	// contains filtered or unexported fields
}

Response for listing available clusters.

func (*ListResponse) Descriptor deprecated

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

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetClusters

func (x *ListResponse) GetClusters() []*Cluster

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect

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

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

type Pod

type Pod struct {
	PodName         string `protobuf:"bytes,1,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"`
	Namespace       string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	ProjectName     string `protobuf:"bytes,3,opt,name=project_name,json=projectName,proto3" json:"project_name,omitempty"`
	EnvironmentName string `protobuf:"bytes,4,opt,name=environment_name,json=environmentName,proto3" json:"environment_name,omitempty"`
	CapsuleName     string `protobuf:"bytes,5,opt,name=capsule_name,json=capsuleName,proto3" json:"capsule_name,omitempty"`
	// contains filtered or unexported fields
}

func (*Pod) Descriptor deprecated

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

Deprecated: Use Pod.ProtoReflect.Descriptor instead.

func (*Pod) GetCapsuleName

func (x *Pod) GetCapsuleName() string

func (*Pod) GetEnvironmentName

func (x *Pod) GetEnvironmentName() string

func (*Pod) GetNamespace

func (x *Pod) GetNamespace() string

func (*Pod) GetPodName

func (x *Pod) GetPodName() string

func (*Pod) GetProjectName

func (x *Pod) GetProjectName() string

func (*Pod) ProtoMessage

func (*Pod) ProtoMessage()

func (*Pod) ProtoReflect

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

func (*Pod) Reset

func (x *Pod) Reset()

func (*Pod) String

func (x *Pod) String() string

type Registry

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

Registry dev registry

func (*Registry) Descriptor deprecated

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

Deprecated: Use Registry.ProtoReflect.Descriptor instead.

func (*Registry) GetHost

func (x *Registry) GetHost() string

func (*Registry) ProtoMessage

func (*Registry) ProtoMessage()

func (*Registry) ProtoReflect

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

func (*Registry) Reset

func (x *Registry) Reset()

func (*Registry) String

func (x *Registry) String() string

type ServiceClient

type ServiceClient interface {
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
	// GetConfig returns the config for the cluster.
	GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error)
	// GetConfigs returns the configs for all clusters.
	GetConfigs(ctx context.Context, in *GetConfigsRequest, opts ...grpc.CallOption) (*GetConfigsResponse, error)
	ListNodePods(ctx context.Context, in *ListNodePodsRequest, opts ...grpc.CallOption) (*ListNodePodsResponse, error)
}

ServiceClient is the client API for Service 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 NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	List(context.Context, *ListRequest) (*ListResponse, error)
	// GetConfig returns the config for the cluster.
	GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error)
	// GetConfigs returns the configs for all clusters.
	GetConfigs(context.Context, *GetConfigsRequest) (*GetConfigsResponse, error)
	ListNodePods(context.Context, *ListNodePodsRequest) (*ListNodePodsResponse, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) GetConfig

func (UnimplementedServiceServer) GetConfigs

func (UnimplementedServiceServer) List

func (UnimplementedServiceServer) ListNodePods

type UnsafeServiceServer

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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