Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterKubeAPIServer(s grpc.ServiceRegistrar, srv KubeAPIServer)
- type GetClusterInfoRequest
- type GetClusterInfoResponse
- func (*GetClusterInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetClusterInfoResponse) GetPodsCidr() []string
- func (x *GetClusterInfoResponse) GetServiceCidr() []string
- func (*GetClusterInfoResponse) ProtoMessage()
- func (x *GetClusterInfoResponse) ProtoReflect() protoreflect.Message
- func (x *GetClusterInfoResponse) Reset()
- func (x *GetClusterInfoResponse) String() string
- type GetIPInfoRequest
- type GetIPInfoResponse
- type GetPodRequest
- type GetPodResponse
- type IPInfo
- func (*IPInfo) Descriptor() ([]byte, []int)deprecated
- func (x *IPInfo) GetNamespace() string
- func (x *IPInfo) GetNodeName() string
- func (x *IPInfo) GetPodName() string
- func (x *IPInfo) GetPodUid() string
- func (x *IPInfo) GetWorkloadKind() string
- func (x *IPInfo) GetWorkloadName() string
- func (x *IPInfo) GetWorkloadUid() string
- func (x *IPInfo) GetZone() string
- func (*IPInfo) ProtoMessage()
- func (x *IPInfo) ProtoReflect() protoreflect.Message
- func (x *IPInfo) Reset()
- func (x *IPInfo) String() string
- type KubeAPIClient
- type KubeAPIServer
- type Pod
- func (*Pod) Descriptor() ([]byte, []int)deprecated
- func (x *Pod) GetNodeName() string
- func (x *Pod) GetWorkloadKind() WorkloadKind
- func (x *Pod) GetWorkloadName() string
- func (x *Pod) GetWorkloadUid() string
- func (x *Pod) GetZone() string
- func (*Pod) ProtoMessage()
- func (x *Pod) ProtoReflect() protoreflect.Message
- func (x *Pod) Reset()
- func (x *Pod) String() string
- type UnimplementedKubeAPIServer
- func (UnimplementedKubeAPIServer) GetClusterInfo(context.Context, *GetClusterInfoRequest) (*GetClusterInfoResponse, error)
- func (UnimplementedKubeAPIServer) GetIPInfo(context.Context, *GetIPInfoRequest) (*GetIPInfoResponse, error)
- func (UnimplementedKubeAPIServer) GetPod(context.Context, *GetPodRequest) (*GetPodResponse, error)
- type UnsafeKubeAPIServer
- type WorkloadKind
- func (WorkloadKind) Descriptor() protoreflect.EnumDescriptor
- func (x WorkloadKind) Enum() *WorkloadKind
- func (WorkloadKind) EnumDescriptor() ([]byte, []int)deprecated
- func (x WorkloadKind) Number() protoreflect.EnumNumber
- func (x WorkloadKind) String() string
- func (WorkloadKind) Type() protoreflect.EnumType
Constants ¶
const ( KubeAPI_GetClusterInfo_FullMethodName = "/kube.v1.KubeAPI/GetClusterInfo" KubeAPI_GetIPInfo_FullMethodName = "/kube.v1.KubeAPI/GetIPInfo" KubeAPI_GetPod_FullMethodName = "/kube.v1.KubeAPI/GetPod" )
Variables ¶
var ( WorkloadKind_name = map[int32]string{ 0: "WORKLOAD_KIND_UNKNOWN", 1: "WORKLOAD_KIND_DEPLOYMENT", 2: "WORKLOAD_KIND_REPLICA_SET", 3: "WORKLOAD_KIND_STATEFUL_SET", 4: "WORKLOAD_KIND_DAEMON_SET", 5: "WORKLOAD_KIND_JOB", 6: "WORKLOAD_KIND_CRONJOB", 7: "WORKLOAD_KIND_POD", } WorkloadKind_value = map[string]int32{ "WORKLOAD_KIND_UNKNOWN": 0, "WORKLOAD_KIND_DEPLOYMENT": 1, "WORKLOAD_KIND_REPLICA_SET": 2, "WORKLOAD_KIND_STATEFUL_SET": 3, "WORKLOAD_KIND_DAEMON_SET": 4, "WORKLOAD_KIND_JOB": 5, "WORKLOAD_KIND_CRONJOB": 6, "WORKLOAD_KIND_POD": 7, } )
Enum value maps for WorkloadKind.
var File_api_v1_kube_kube_api_proto protoreflect.FileDescriptor
var KubeAPI_ServiceDesc = grpc.ServiceDesc{ ServiceName: "kube.v1.KubeAPI", HandlerType: (*KubeAPIServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetClusterInfo", Handler: _KubeAPI_GetClusterInfo_Handler, }, { MethodName: "GetIPInfo", Handler: _KubeAPI_GetIPInfo_Handler, }, { MethodName: "GetPod", Handler: _KubeAPI_GetPod_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/kube/kube_api.proto", }
KubeAPI_ServiceDesc is the grpc.ServiceDesc for KubeAPI service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterKubeAPIServer ¶
func RegisterKubeAPIServer(s grpc.ServiceRegistrar, srv KubeAPIServer)
Types ¶
type GetClusterInfoRequest ¶
type GetClusterInfoRequest struct {
// contains filtered or unexported fields
}
func (*GetClusterInfoRequest) Descriptor
deprecated
func (*GetClusterInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetClusterInfoRequest.ProtoReflect.Descriptor instead.
func (*GetClusterInfoRequest) ProtoMessage ¶
func (*GetClusterInfoRequest) ProtoMessage()
func (*GetClusterInfoRequest) ProtoReflect ¶
func (x *GetClusterInfoRequest) ProtoReflect() protoreflect.Message
func (*GetClusterInfoRequest) Reset ¶
func (x *GetClusterInfoRequest) Reset()
func (*GetClusterInfoRequest) String ¶
func (x *GetClusterInfoRequest) String() string
type GetClusterInfoResponse ¶
type GetClusterInfoResponse struct { PodsCidr []string `protobuf:"bytes,1,rep,name=pods_cidr,json=podsCidr,proto3" json:"pods_cidr,omitempty"` ServiceCidr []string `protobuf:"bytes,2,rep,name=service_cidr,json=serviceCidr,proto3" json:"service_cidr,omitempty"` // contains filtered or unexported fields }
func (*GetClusterInfoResponse) Descriptor
deprecated
func (*GetClusterInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetClusterInfoResponse.ProtoReflect.Descriptor instead.
func (*GetClusterInfoResponse) GetPodsCidr ¶
func (x *GetClusterInfoResponse) GetPodsCidr() []string
func (*GetClusterInfoResponse) GetServiceCidr ¶
func (x *GetClusterInfoResponse) GetServiceCidr() []string
func (*GetClusterInfoResponse) ProtoMessage ¶
func (*GetClusterInfoResponse) ProtoMessage()
func (*GetClusterInfoResponse) ProtoReflect ¶
func (x *GetClusterInfoResponse) ProtoReflect() protoreflect.Message
func (*GetClusterInfoResponse) Reset ¶
func (x *GetClusterInfoResponse) Reset()
func (*GetClusterInfoResponse) String ¶
func (x *GetClusterInfoResponse) String() string
type GetIPInfoRequest ¶
type GetIPInfoRequest struct { Ip []byte `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` // contains filtered or unexported fields }
func (*GetIPInfoRequest) Descriptor
deprecated
func (*GetIPInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetIPInfoRequest.ProtoReflect.Descriptor instead.
func (*GetIPInfoRequest) GetIp ¶
func (x *GetIPInfoRequest) GetIp() []byte
func (*GetIPInfoRequest) ProtoMessage ¶
func (*GetIPInfoRequest) ProtoMessage()
func (*GetIPInfoRequest) ProtoReflect ¶
func (x *GetIPInfoRequest) ProtoReflect() protoreflect.Message
func (*GetIPInfoRequest) Reset ¶
func (x *GetIPInfoRequest) Reset()
func (*GetIPInfoRequest) String ¶
func (x *GetIPInfoRequest) String() string
type GetIPInfoResponse ¶
type GetIPInfoResponse struct { Info *IPInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` // contains filtered or unexported fields }
func (*GetIPInfoResponse) Descriptor
deprecated
func (*GetIPInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetIPInfoResponse.ProtoReflect.Descriptor instead.
func (*GetIPInfoResponse) GetInfo ¶
func (x *GetIPInfoResponse) GetInfo() *IPInfo
func (*GetIPInfoResponse) ProtoMessage ¶
func (*GetIPInfoResponse) ProtoMessage()
func (*GetIPInfoResponse) ProtoReflect ¶
func (x *GetIPInfoResponse) ProtoReflect() protoreflect.Message
func (*GetIPInfoResponse) Reset ¶
func (x *GetIPInfoResponse) Reset()
func (*GetIPInfoResponse) String ¶
func (x *GetIPInfoResponse) String() string
type GetPodRequest ¶
type GetPodRequest struct { Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` // contains filtered or unexported fields }
func (*GetPodRequest) Descriptor
deprecated
func (*GetPodRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetPodRequest.ProtoReflect.Descriptor instead.
func (*GetPodRequest) GetUid ¶
func (x *GetPodRequest) GetUid() string
func (*GetPodRequest) ProtoMessage ¶
func (*GetPodRequest) ProtoMessage()
func (*GetPodRequest) ProtoReflect ¶
func (x *GetPodRequest) ProtoReflect() protoreflect.Message
func (*GetPodRequest) Reset ¶
func (x *GetPodRequest) Reset()
func (*GetPodRequest) String ¶
func (x *GetPodRequest) String() string
type GetPodResponse ¶
type GetPodResponse struct { Pod *Pod `protobuf:"bytes,1,opt,name=pod,proto3" json:"pod,omitempty"` // contains filtered or unexported fields }
func (*GetPodResponse) Descriptor
deprecated
func (*GetPodResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetPodResponse.ProtoReflect.Descriptor instead.
func (*GetPodResponse) GetPod ¶
func (x *GetPodResponse) GetPod() *Pod
func (*GetPodResponse) ProtoMessage ¶
func (*GetPodResponse) ProtoMessage()
func (*GetPodResponse) ProtoReflect ¶
func (x *GetPodResponse) ProtoReflect() protoreflect.Message
func (*GetPodResponse) Reset ¶
func (x *GetPodResponse) Reset()
func (*GetPodResponse) String ¶
func (x *GetPodResponse) String() string
type IPInfo ¶
type IPInfo struct { PodUid string `protobuf:"bytes,1,opt,name=pod_uid,json=podUid,proto3" json:"pod_uid,omitempty"` PodName string `protobuf:"bytes,3,opt,name=pod_name,json=podName,proto3" json:"pod_name,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` WorkloadName string `protobuf:"bytes,4,opt,name=workload_name,json=workloadName,proto3" json:"workload_name,omitempty"` WorkloadKind string `protobuf:"bytes,5,opt,name=workload_kind,json=workloadKind,proto3" json:"workload_kind,omitempty"` WorkloadUid string `protobuf:"bytes,6,opt,name=workload_uid,json=workloadUid,proto3" json:"workload_uid,omitempty"` Zone string `protobuf:"bytes,7,opt,name=zone,proto3" json:"zone,omitempty"` NodeName string `protobuf:"bytes,8,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` // contains filtered or unexported fields }
func (*IPInfo) Descriptor
deprecated
func (*IPInfo) GetNamespace ¶
func (*IPInfo) GetNodeName ¶ added in v1.21.0
func (*IPInfo) GetPodName ¶
func (*IPInfo) GetWorkloadKind ¶
func (*IPInfo) GetWorkloadName ¶
func (*IPInfo) GetWorkloadUid ¶
func (*IPInfo) ProtoMessage ¶
func (*IPInfo) ProtoMessage()
func (*IPInfo) ProtoReflect ¶
func (x *IPInfo) ProtoReflect() protoreflect.Message
type KubeAPIClient ¶
type KubeAPIClient interface { GetClusterInfo(ctx context.Context, in *GetClusterInfoRequest, opts ...grpc.CallOption) (*GetClusterInfoResponse, error) GetIPInfo(ctx context.Context, in *GetIPInfoRequest, opts ...grpc.CallOption) (*GetIPInfoResponse, error) GetPod(ctx context.Context, in *GetPodRequest, opts ...grpc.CallOption) (*GetPodResponse, error) }
KubeAPIClient is the client API for KubeAPI 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 NewKubeAPIClient ¶
func NewKubeAPIClient(cc grpc.ClientConnInterface) KubeAPIClient
type KubeAPIServer ¶
type KubeAPIServer interface { GetClusterInfo(context.Context, *GetClusterInfoRequest) (*GetClusterInfoResponse, error) GetIPInfo(context.Context, *GetIPInfoRequest) (*GetIPInfoResponse, error) GetPod(context.Context, *GetPodRequest) (*GetPodResponse, error) }
KubeAPIServer is the server API for KubeAPI service. All implementations should embed UnimplementedKubeAPIServer for forward compatibility.
type Pod ¶
type Pod struct { WorkloadUid string `protobuf:"bytes,1,opt,name=workload_uid,json=workloadUid,proto3" json:"workload_uid,omitempty"` WorkloadName string `protobuf:"bytes,2,opt,name=workload_name,json=workloadName,proto3" json:"workload_name,omitempty"` WorkloadKind WorkloadKind `protobuf:"varint,3,opt,name=workload_kind,json=workloadKind,proto3,enum=kube.v1.WorkloadKind" json:"workload_kind,omitempty"` Zone string `protobuf:"bytes,4,opt,name=zone,proto3" json:"zone,omitempty"` NodeName string `protobuf:"bytes,5,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` // contains filtered or unexported fields }
func (*Pod) Descriptor
deprecated
func (*Pod) GetNodeName ¶ added in v1.21.0
func (*Pod) GetWorkloadKind ¶
func (x *Pod) GetWorkloadKind() WorkloadKind
func (*Pod) GetWorkloadName ¶
func (*Pod) GetWorkloadUid ¶ added in v1.10.1
func (*Pod) ProtoMessage ¶
func (*Pod) ProtoMessage()
func (*Pod) ProtoReflect ¶
func (x *Pod) ProtoReflect() protoreflect.Message
type UnimplementedKubeAPIServer ¶
type UnimplementedKubeAPIServer struct{}
UnimplementedKubeAPIServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedKubeAPIServer) GetClusterInfo ¶
func (UnimplementedKubeAPIServer) GetClusterInfo(context.Context, *GetClusterInfoRequest) (*GetClusterInfoResponse, error)
func (UnimplementedKubeAPIServer) GetIPInfo ¶
func (UnimplementedKubeAPIServer) GetIPInfo(context.Context, *GetIPInfoRequest) (*GetIPInfoResponse, error)
func (UnimplementedKubeAPIServer) GetPod ¶
func (UnimplementedKubeAPIServer) GetPod(context.Context, *GetPodRequest) (*GetPodResponse, error)
type UnsafeKubeAPIServer ¶
type UnsafeKubeAPIServer interface {
// contains filtered or unexported methods
}
UnsafeKubeAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to KubeAPIServer will result in compilation errors.
type WorkloadKind ¶ added in v1.35.0
type WorkloadKind int32
const ( WorkloadKind_WORKLOAD_KIND_UNKNOWN WorkloadKind = 0 WorkloadKind_WORKLOAD_KIND_DEPLOYMENT WorkloadKind = 1 WorkloadKind_WORKLOAD_KIND_REPLICA_SET WorkloadKind = 2 WorkloadKind_WORKLOAD_KIND_STATEFUL_SET WorkloadKind = 3 WorkloadKind_WORKLOAD_KIND_DAEMON_SET WorkloadKind = 4 WorkloadKind_WORKLOAD_KIND_JOB WorkloadKind = 5 WorkloadKind_WORKLOAD_KIND_CRONJOB WorkloadKind = 6 WorkloadKind_WORKLOAD_KIND_POD WorkloadKind = 7 )
func (WorkloadKind) Descriptor ¶ added in v1.35.0
func (WorkloadKind) Descriptor() protoreflect.EnumDescriptor
func (WorkloadKind) Enum ¶ added in v1.35.0
func (x WorkloadKind) Enum() *WorkloadKind
func (WorkloadKind) EnumDescriptor
deprecated
added in
v1.35.0
func (WorkloadKind) EnumDescriptor() ([]byte, []int)
Deprecated: Use WorkloadKind.Descriptor instead.
func (WorkloadKind) Number ¶ added in v1.35.0
func (x WorkloadKind) Number() protoreflect.EnumNumber
func (WorkloadKind) String ¶ added in v1.35.0
func (x WorkloadKind) String() string
func (WorkloadKind) Type ¶ added in v1.35.0
func (WorkloadKind) Type() protoreflect.EnumType