Documentation ¶
Overview ¶
Package metrics is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterMetricsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMetricsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MetricsClient) error
- func RegisterMetricsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMetricsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MetricsServer) error
- func RegisterMetricsServer(s grpc.ServiceRegistrar, srv MetricsServer)
- type CpuMemoryInNamespaceRequest
- func (*CpuMemoryInNamespaceRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CpuMemoryInNamespaceRequest) GetNamespaceId() int32
- func (*CpuMemoryInNamespaceRequest) ProtoMessage()
- func (x *CpuMemoryInNamespaceRequest) ProtoReflect() protoreflect.Message
- func (x *CpuMemoryInNamespaceRequest) Reset()
- func (x *CpuMemoryInNamespaceRequest) String() string
- func (m *CpuMemoryInNamespaceRequest) Validate() error
- func (m *CpuMemoryInNamespaceRequest) ValidateAll() error
- type CpuMemoryInNamespaceRequestMultiError
- type CpuMemoryInNamespaceRequestValidationError
- func (e CpuMemoryInNamespaceRequestValidationError) Cause() error
- func (e CpuMemoryInNamespaceRequestValidationError) Error() string
- func (e CpuMemoryInNamespaceRequestValidationError) ErrorName() string
- func (e CpuMemoryInNamespaceRequestValidationError) Field() string
- func (e CpuMemoryInNamespaceRequestValidationError) Key() bool
- func (e CpuMemoryInNamespaceRequestValidationError) Reason() string
- type CpuMemoryInNamespaceResponse
- func (*CpuMemoryInNamespaceResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CpuMemoryInNamespaceResponse) GetCpu() string
- func (x *CpuMemoryInNamespaceResponse) GetMemory() string
- func (*CpuMemoryInNamespaceResponse) ProtoMessage()
- func (x *CpuMemoryInNamespaceResponse) ProtoReflect() protoreflect.Message
- func (x *CpuMemoryInNamespaceResponse) Reset()
- func (x *CpuMemoryInNamespaceResponse) String() string
- func (m *CpuMemoryInNamespaceResponse) Validate() error
- func (m *CpuMemoryInNamespaceResponse) ValidateAll() error
- type CpuMemoryInNamespaceResponseMultiError
- type CpuMemoryInNamespaceResponseValidationError
- func (e CpuMemoryInNamespaceResponseValidationError) Cause() error
- func (e CpuMemoryInNamespaceResponseValidationError) Error() string
- func (e CpuMemoryInNamespaceResponseValidationError) ErrorName() string
- func (e CpuMemoryInNamespaceResponseValidationError) Field() string
- func (e CpuMemoryInNamespaceResponseValidationError) Key() bool
- func (e CpuMemoryInNamespaceResponseValidationError) Reason() string
- type CpuMemoryInProjectRequest
- func (*CpuMemoryInProjectRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CpuMemoryInProjectRequest) GetProjectId() int32
- func (*CpuMemoryInProjectRequest) ProtoMessage()
- func (x *CpuMemoryInProjectRequest) ProtoReflect() protoreflect.Message
- func (x *CpuMemoryInProjectRequest) Reset()
- func (x *CpuMemoryInProjectRequest) String() string
- func (m *CpuMemoryInProjectRequest) Validate() error
- func (m *CpuMemoryInProjectRequest) ValidateAll() error
- type CpuMemoryInProjectRequestMultiError
- type CpuMemoryInProjectRequestValidationError
- func (e CpuMemoryInProjectRequestValidationError) Cause() error
- func (e CpuMemoryInProjectRequestValidationError) Error() string
- func (e CpuMemoryInProjectRequestValidationError) ErrorName() string
- func (e CpuMemoryInProjectRequestValidationError) Field() string
- func (e CpuMemoryInProjectRequestValidationError) Key() bool
- func (e CpuMemoryInProjectRequestValidationError) Reason() string
- type CpuMemoryInProjectResponse
- func (*CpuMemoryInProjectResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CpuMemoryInProjectResponse) GetCpu() string
- func (x *CpuMemoryInProjectResponse) GetMemory() string
- func (*CpuMemoryInProjectResponse) ProtoMessage()
- func (x *CpuMemoryInProjectResponse) ProtoReflect() protoreflect.Message
- func (x *CpuMemoryInProjectResponse) Reset()
- func (x *CpuMemoryInProjectResponse) String() string
- func (m *CpuMemoryInProjectResponse) Validate() error
- func (m *CpuMemoryInProjectResponse) ValidateAll() error
- type CpuMemoryInProjectResponseMultiError
- type CpuMemoryInProjectResponseValidationError
- func (e CpuMemoryInProjectResponseValidationError) Cause() error
- func (e CpuMemoryInProjectResponseValidationError) Error() string
- func (e CpuMemoryInProjectResponseValidationError) ErrorName() string
- func (e CpuMemoryInProjectResponseValidationError) Field() string
- func (e CpuMemoryInProjectResponseValidationError) Key() bool
- func (e CpuMemoryInProjectResponseValidationError) Reason() string
- type MetricsClient
- type MetricsServer
- type Metrics_StreamTopPodClient
- type Metrics_StreamTopPodServer
- type TopPodRequest
- func (*TopPodRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TopPodRequest) GetNamespace() string
- func (x *TopPodRequest) GetPod() string
- func (*TopPodRequest) ProtoMessage()
- func (x *TopPodRequest) ProtoReflect() protoreflect.Message
- func (x *TopPodRequest) Reset()
- func (x *TopPodRequest) String() string
- func (m *TopPodRequest) Validate() error
- func (m *TopPodRequest) ValidateAll() error
- type TopPodRequestMultiError
- type TopPodRequestValidationError
- func (e TopPodRequestValidationError) Cause() error
- func (e TopPodRequestValidationError) Error() string
- func (e TopPodRequestValidationError) ErrorName() string
- func (e TopPodRequestValidationError) Field() string
- func (e TopPodRequestValidationError) Key() bool
- func (e TopPodRequestValidationError) Reason() string
- type TopPodResponse
- func (*TopPodResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TopPodResponse) GetCpu() float64
- func (x *TopPodResponse) GetHumanizeCpu() string
- func (x *TopPodResponse) GetHumanizeMemory() string
- func (x *TopPodResponse) GetLength() int32
- func (x *TopPodResponse) GetMemory() float64
- func (x *TopPodResponse) GetTime() string
- func (*TopPodResponse) ProtoMessage()
- func (x *TopPodResponse) ProtoReflect() protoreflect.Message
- func (x *TopPodResponse) Reset()
- func (x *TopPodResponse) String() string
- func (m *TopPodResponse) Validate() error
- func (m *TopPodResponse) ValidateAll() error
- type TopPodResponseMultiError
- type TopPodResponseValidationError
- func (e TopPodResponseValidationError) Cause() error
- func (e TopPodResponseValidationError) Error() string
- func (e TopPodResponseValidationError) ErrorName() string
- func (e TopPodResponseValidationError) Field() string
- func (e TopPodResponseValidationError) Key() bool
- func (e TopPodResponseValidationError) Reason() string
- type UnimplementedMetricsServer
- func (UnimplementedMetricsServer) CpuMemoryInNamespace(context.Context, *CpuMemoryInNamespaceRequest) (*CpuMemoryInNamespaceResponse, error)
- func (UnimplementedMetricsServer) CpuMemoryInProject(context.Context, *CpuMemoryInProjectRequest) (*CpuMemoryInProjectResponse, error)
- func (UnimplementedMetricsServer) StreamTopPod(*TopPodRequest, Metrics_StreamTopPodServer) error
- func (UnimplementedMetricsServer) TopPod(context.Context, *TopPodRequest) (*TopPodResponse, error)
- type UnsafeMetricsServer
Constants ¶
const ( Metrics_CpuMemoryInNamespace_FullMethodName = "/metrics.Metrics/CpuMemoryInNamespace" Metrics_CpuMemoryInProject_FullMethodName = "/metrics.Metrics/CpuMemoryInProject" Metrics_TopPod_FullMethodName = "/metrics.Metrics/TopPod" Metrics_StreamTopPod_FullMethodName = "/metrics.Metrics/StreamTopPod" )
Variables ¶
var File_metrics_metrics_proto protoreflect.FileDescriptor
var Metrics_ServiceDesc = grpc.ServiceDesc{ ServiceName: "metrics.Metrics", HandlerType: (*MetricsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CpuMemoryInNamespace", Handler: _Metrics_CpuMemoryInNamespace_Handler, }, { MethodName: "CpuMemoryInProject", Handler: _Metrics_CpuMemoryInProject_Handler, }, { MethodName: "TopPod", Handler: _Metrics_TopPod_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "StreamTopPod", Handler: _Metrics_StreamTopPod_Handler, ServerStreams: true, }, }, Metadata: "metrics/metrics.proto", }
Metrics_ServiceDesc is the grpc.ServiceDesc for Metrics service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMetricsHandler ¶
func RegisterMetricsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterMetricsHandler registers the http handlers for service Metrics to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMetricsHandlerClient ¶
func RegisterMetricsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MetricsClient) error
RegisterMetricsHandlerClient registers the http handlers for service Metrics to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MetricsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MetricsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MetricsClient" to call the correct interceptors.
func RegisterMetricsHandlerFromEndpoint ¶
func RegisterMetricsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMetricsHandlerFromEndpoint is same as RegisterMetricsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMetricsHandlerServer ¶
func RegisterMetricsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MetricsServer) error
RegisterMetricsHandlerServer registers the http handlers for service Metrics to "mux". UnaryRPC :call MetricsServer 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 RegisterMetricsHandlerFromEndpoint instead.
func RegisterMetricsServer ¶
func RegisterMetricsServer(s grpc.ServiceRegistrar, srv MetricsServer)
Types ¶
type CpuMemoryInNamespaceRequest ¶
type CpuMemoryInNamespaceRequest struct { NamespaceId int32 `protobuf:"varint,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // contains filtered or unexported fields }
func (*CpuMemoryInNamespaceRequest) Descriptor
deprecated
func (*CpuMemoryInNamespaceRequest) Descriptor() ([]byte, []int)
Deprecated: Use CpuMemoryInNamespaceRequest.ProtoReflect.Descriptor instead.
func (*CpuMemoryInNamespaceRequest) GetNamespaceId ¶
func (x *CpuMemoryInNamespaceRequest) GetNamespaceId() int32
func (*CpuMemoryInNamespaceRequest) ProtoMessage ¶
func (*CpuMemoryInNamespaceRequest) ProtoMessage()
func (*CpuMemoryInNamespaceRequest) ProtoReflect ¶
func (x *CpuMemoryInNamespaceRequest) ProtoReflect() protoreflect.Message
func (*CpuMemoryInNamespaceRequest) Reset ¶
func (x *CpuMemoryInNamespaceRequest) Reset()
func (*CpuMemoryInNamespaceRequest) String ¶
func (x *CpuMemoryInNamespaceRequest) String() string
func (*CpuMemoryInNamespaceRequest) Validate ¶
func (m *CpuMemoryInNamespaceRequest) Validate() error
Validate checks the field values on CpuMemoryInNamespaceRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*CpuMemoryInNamespaceRequest) ValidateAll ¶
func (m *CpuMemoryInNamespaceRequest) ValidateAll() error
ValidateAll checks the field values on CpuMemoryInNamespaceRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CpuMemoryInNamespaceRequestMultiError, or nil if none found.
type CpuMemoryInNamespaceRequestMultiError ¶
type CpuMemoryInNamespaceRequestMultiError []error
CpuMemoryInNamespaceRequestMultiError is an error wrapping multiple validation errors returned by CpuMemoryInNamespaceRequest.ValidateAll() if the designated constraints aren't met.
func (CpuMemoryInNamespaceRequestMultiError) AllErrors ¶
func (m CpuMemoryInNamespaceRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CpuMemoryInNamespaceRequestMultiError) Error ¶
func (m CpuMemoryInNamespaceRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CpuMemoryInNamespaceRequestValidationError ¶
type CpuMemoryInNamespaceRequestValidationError struct {
// contains filtered or unexported fields
}
CpuMemoryInNamespaceRequestValidationError is the validation error returned by CpuMemoryInNamespaceRequest.Validate if the designated constraints aren't met.
func (CpuMemoryInNamespaceRequestValidationError) Cause ¶
func (e CpuMemoryInNamespaceRequestValidationError) Cause() error
Cause function returns cause value.
func (CpuMemoryInNamespaceRequestValidationError) Error ¶
func (e CpuMemoryInNamespaceRequestValidationError) Error() string
Error satisfies the builtin error interface
func (CpuMemoryInNamespaceRequestValidationError) ErrorName ¶
func (e CpuMemoryInNamespaceRequestValidationError) ErrorName() string
ErrorName returns error name.
func (CpuMemoryInNamespaceRequestValidationError) Field ¶
func (e CpuMemoryInNamespaceRequestValidationError) Field() string
Field function returns field value.
func (CpuMemoryInNamespaceRequestValidationError) Key ¶
func (e CpuMemoryInNamespaceRequestValidationError) Key() bool
Key function returns key value.
func (CpuMemoryInNamespaceRequestValidationError) Reason ¶
func (e CpuMemoryInNamespaceRequestValidationError) Reason() string
Reason function returns reason value.
type CpuMemoryInNamespaceResponse ¶
type CpuMemoryInNamespaceResponse struct { Cpu string `protobuf:"bytes,1,opt,name=cpu,proto3" json:"cpu,omitempty"` Memory string `protobuf:"bytes,2,opt,name=memory,proto3" json:"memory,omitempty"` // contains filtered or unexported fields }
func (*CpuMemoryInNamespaceResponse) Descriptor
deprecated
func (*CpuMemoryInNamespaceResponse) Descriptor() ([]byte, []int)
Deprecated: Use CpuMemoryInNamespaceResponse.ProtoReflect.Descriptor instead.
func (*CpuMemoryInNamespaceResponse) GetCpu ¶
func (x *CpuMemoryInNamespaceResponse) GetCpu() string
func (*CpuMemoryInNamespaceResponse) GetMemory ¶
func (x *CpuMemoryInNamespaceResponse) GetMemory() string
func (*CpuMemoryInNamespaceResponse) ProtoMessage ¶
func (*CpuMemoryInNamespaceResponse) ProtoMessage()
func (*CpuMemoryInNamespaceResponse) ProtoReflect ¶
func (x *CpuMemoryInNamespaceResponse) ProtoReflect() protoreflect.Message
func (*CpuMemoryInNamespaceResponse) Reset ¶
func (x *CpuMemoryInNamespaceResponse) Reset()
func (*CpuMemoryInNamespaceResponse) String ¶
func (x *CpuMemoryInNamespaceResponse) String() string
func (*CpuMemoryInNamespaceResponse) Validate ¶
func (m *CpuMemoryInNamespaceResponse) Validate() error
Validate checks the field values on CpuMemoryInNamespaceResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*CpuMemoryInNamespaceResponse) ValidateAll ¶
func (m *CpuMemoryInNamespaceResponse) ValidateAll() error
ValidateAll checks the field values on CpuMemoryInNamespaceResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CpuMemoryInNamespaceResponseMultiError, or nil if none found.
type CpuMemoryInNamespaceResponseMultiError ¶
type CpuMemoryInNamespaceResponseMultiError []error
CpuMemoryInNamespaceResponseMultiError is an error wrapping multiple validation errors returned by CpuMemoryInNamespaceResponse.ValidateAll() if the designated constraints aren't met.
func (CpuMemoryInNamespaceResponseMultiError) AllErrors ¶
func (m CpuMemoryInNamespaceResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CpuMemoryInNamespaceResponseMultiError) Error ¶
func (m CpuMemoryInNamespaceResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CpuMemoryInNamespaceResponseValidationError ¶
type CpuMemoryInNamespaceResponseValidationError struct {
// contains filtered or unexported fields
}
CpuMemoryInNamespaceResponseValidationError is the validation error returned by CpuMemoryInNamespaceResponse.Validate if the designated constraints aren't met.
func (CpuMemoryInNamespaceResponseValidationError) Cause ¶
func (e CpuMemoryInNamespaceResponseValidationError) Cause() error
Cause function returns cause value.
func (CpuMemoryInNamespaceResponseValidationError) Error ¶
func (e CpuMemoryInNamespaceResponseValidationError) Error() string
Error satisfies the builtin error interface
func (CpuMemoryInNamespaceResponseValidationError) ErrorName ¶
func (e CpuMemoryInNamespaceResponseValidationError) ErrorName() string
ErrorName returns error name.
func (CpuMemoryInNamespaceResponseValidationError) Field ¶
func (e CpuMemoryInNamespaceResponseValidationError) Field() string
Field function returns field value.
func (CpuMemoryInNamespaceResponseValidationError) Key ¶
func (e CpuMemoryInNamespaceResponseValidationError) Key() bool
Key function returns key value.
func (CpuMemoryInNamespaceResponseValidationError) Reason ¶
func (e CpuMemoryInNamespaceResponseValidationError) Reason() string
Reason function returns reason value.
type CpuMemoryInProjectRequest ¶
type CpuMemoryInProjectRequest struct { ProjectId int32 `protobuf:"varint,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"` // contains filtered or unexported fields }
func (*CpuMemoryInProjectRequest) Descriptor
deprecated
func (*CpuMemoryInProjectRequest) Descriptor() ([]byte, []int)
Deprecated: Use CpuMemoryInProjectRequest.ProtoReflect.Descriptor instead.
func (*CpuMemoryInProjectRequest) GetProjectId ¶
func (x *CpuMemoryInProjectRequest) GetProjectId() int32
func (*CpuMemoryInProjectRequest) ProtoMessage ¶
func (*CpuMemoryInProjectRequest) ProtoMessage()
func (*CpuMemoryInProjectRequest) ProtoReflect ¶
func (x *CpuMemoryInProjectRequest) ProtoReflect() protoreflect.Message
func (*CpuMemoryInProjectRequest) Reset ¶
func (x *CpuMemoryInProjectRequest) Reset()
func (*CpuMemoryInProjectRequest) String ¶
func (x *CpuMemoryInProjectRequest) String() string
func (*CpuMemoryInProjectRequest) Validate ¶
func (m *CpuMemoryInProjectRequest) Validate() error
Validate checks the field values on CpuMemoryInProjectRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*CpuMemoryInProjectRequest) ValidateAll ¶
func (m *CpuMemoryInProjectRequest) ValidateAll() error
ValidateAll checks the field values on CpuMemoryInProjectRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CpuMemoryInProjectRequestMultiError, or nil if none found.
type CpuMemoryInProjectRequestMultiError ¶
type CpuMemoryInProjectRequestMultiError []error
CpuMemoryInProjectRequestMultiError is an error wrapping multiple validation errors returned by CpuMemoryInProjectRequest.ValidateAll() if the designated constraints aren't met.
func (CpuMemoryInProjectRequestMultiError) AllErrors ¶
func (m CpuMemoryInProjectRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CpuMemoryInProjectRequestMultiError) Error ¶
func (m CpuMemoryInProjectRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CpuMemoryInProjectRequestValidationError ¶
type CpuMemoryInProjectRequestValidationError struct {
// contains filtered or unexported fields
}
CpuMemoryInProjectRequestValidationError is the validation error returned by CpuMemoryInProjectRequest.Validate if the designated constraints aren't met.
func (CpuMemoryInProjectRequestValidationError) Cause ¶
func (e CpuMemoryInProjectRequestValidationError) Cause() error
Cause function returns cause value.
func (CpuMemoryInProjectRequestValidationError) Error ¶
func (e CpuMemoryInProjectRequestValidationError) Error() string
Error satisfies the builtin error interface
func (CpuMemoryInProjectRequestValidationError) ErrorName ¶
func (e CpuMemoryInProjectRequestValidationError) ErrorName() string
ErrorName returns error name.
func (CpuMemoryInProjectRequestValidationError) Field ¶
func (e CpuMemoryInProjectRequestValidationError) Field() string
Field function returns field value.
func (CpuMemoryInProjectRequestValidationError) Key ¶
func (e CpuMemoryInProjectRequestValidationError) Key() bool
Key function returns key value.
func (CpuMemoryInProjectRequestValidationError) Reason ¶
func (e CpuMemoryInProjectRequestValidationError) Reason() string
Reason function returns reason value.
type CpuMemoryInProjectResponse ¶
type CpuMemoryInProjectResponse struct { Cpu string `protobuf:"bytes,1,opt,name=cpu,proto3" json:"cpu,omitempty"` Memory string `protobuf:"bytes,2,opt,name=memory,proto3" json:"memory,omitempty"` // contains filtered or unexported fields }
func (*CpuMemoryInProjectResponse) Descriptor
deprecated
func (*CpuMemoryInProjectResponse) Descriptor() ([]byte, []int)
Deprecated: Use CpuMemoryInProjectResponse.ProtoReflect.Descriptor instead.
func (*CpuMemoryInProjectResponse) GetCpu ¶
func (x *CpuMemoryInProjectResponse) GetCpu() string
func (*CpuMemoryInProjectResponse) GetMemory ¶
func (x *CpuMemoryInProjectResponse) GetMemory() string
func (*CpuMemoryInProjectResponse) ProtoMessage ¶
func (*CpuMemoryInProjectResponse) ProtoMessage()
func (*CpuMemoryInProjectResponse) ProtoReflect ¶
func (x *CpuMemoryInProjectResponse) ProtoReflect() protoreflect.Message
func (*CpuMemoryInProjectResponse) Reset ¶
func (x *CpuMemoryInProjectResponse) Reset()
func (*CpuMemoryInProjectResponse) String ¶
func (x *CpuMemoryInProjectResponse) String() string
func (*CpuMemoryInProjectResponse) Validate ¶
func (m *CpuMemoryInProjectResponse) Validate() error
Validate checks the field values on CpuMemoryInProjectResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*CpuMemoryInProjectResponse) ValidateAll ¶
func (m *CpuMemoryInProjectResponse) ValidateAll() error
ValidateAll checks the field values on CpuMemoryInProjectResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CpuMemoryInProjectResponseMultiError, or nil if none found.
type CpuMemoryInProjectResponseMultiError ¶
type CpuMemoryInProjectResponseMultiError []error
CpuMemoryInProjectResponseMultiError is an error wrapping multiple validation errors returned by CpuMemoryInProjectResponse.ValidateAll() if the designated constraints aren't met.
func (CpuMemoryInProjectResponseMultiError) AllErrors ¶
func (m CpuMemoryInProjectResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CpuMemoryInProjectResponseMultiError) Error ¶
func (m CpuMemoryInProjectResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CpuMemoryInProjectResponseValidationError ¶
type CpuMemoryInProjectResponseValidationError struct {
// contains filtered or unexported fields
}
CpuMemoryInProjectResponseValidationError is the validation error returned by CpuMemoryInProjectResponse.Validate if the designated constraints aren't met.
func (CpuMemoryInProjectResponseValidationError) Cause ¶
func (e CpuMemoryInProjectResponseValidationError) Cause() error
Cause function returns cause value.
func (CpuMemoryInProjectResponseValidationError) Error ¶
func (e CpuMemoryInProjectResponseValidationError) Error() string
Error satisfies the builtin error interface
func (CpuMemoryInProjectResponseValidationError) ErrorName ¶
func (e CpuMemoryInProjectResponseValidationError) ErrorName() string
ErrorName returns error name.
func (CpuMemoryInProjectResponseValidationError) Field ¶
func (e CpuMemoryInProjectResponseValidationError) Field() string
Field function returns field value.
func (CpuMemoryInProjectResponseValidationError) Key ¶
func (e CpuMemoryInProjectResponseValidationError) Key() bool
Key function returns key value.
func (CpuMemoryInProjectResponseValidationError) Reason ¶
func (e CpuMemoryInProjectResponseValidationError) Reason() string
Reason function returns reason value.
type MetricsClient ¶
type MetricsClient interface { CpuMemoryInNamespace(ctx context.Context, in *CpuMemoryInNamespaceRequest, opts ...grpc.CallOption) (*CpuMemoryInNamespaceResponse, error) CpuMemoryInProject(ctx context.Context, in *CpuMemoryInProjectRequest, opts ...grpc.CallOption) (*CpuMemoryInProjectResponse, error) TopPod(ctx context.Context, in *TopPodRequest, opts ...grpc.CallOption) (*TopPodResponse, error) StreamTopPod(ctx context.Context, in *TopPodRequest, opts ...grpc.CallOption) (Metrics_StreamTopPodClient, error) }
MetricsClient is the client API for Metrics 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 NewMetricsClient ¶
func NewMetricsClient(cc grpc.ClientConnInterface) MetricsClient
type MetricsServer ¶
type MetricsServer interface { CpuMemoryInNamespace(context.Context, *CpuMemoryInNamespaceRequest) (*CpuMemoryInNamespaceResponse, error) CpuMemoryInProject(context.Context, *CpuMemoryInProjectRequest) (*CpuMemoryInProjectResponse, error) TopPod(context.Context, *TopPodRequest) (*TopPodResponse, error) StreamTopPod(*TopPodRequest, Metrics_StreamTopPodServer) error // contains filtered or unexported methods }
MetricsServer is the server API for Metrics service. All implementations must embed UnimplementedMetricsServer for forward compatibility
type Metrics_StreamTopPodClient ¶
type Metrics_StreamTopPodClient interface { Recv() (*TopPodResponse, error) grpc.ClientStream }
type Metrics_StreamTopPodServer ¶
type Metrics_StreamTopPodServer interface { Send(*TopPodResponse) error grpc.ServerStream }
type TopPodRequest ¶
type TopPodRequest struct { Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` Pod string `protobuf:"bytes,2,opt,name=pod,proto3" json:"pod,omitempty"` // contains filtered or unexported fields }
func (*TopPodRequest) Descriptor
deprecated
func (*TopPodRequest) Descriptor() ([]byte, []int)
Deprecated: Use TopPodRequest.ProtoReflect.Descriptor instead.
func (*TopPodRequest) GetNamespace ¶
func (x *TopPodRequest) GetNamespace() string
func (*TopPodRequest) GetPod ¶
func (x *TopPodRequest) GetPod() string
func (*TopPodRequest) ProtoMessage ¶
func (*TopPodRequest) ProtoMessage()
func (*TopPodRequest) ProtoReflect ¶
func (x *TopPodRequest) ProtoReflect() protoreflect.Message
func (*TopPodRequest) Reset ¶
func (x *TopPodRequest) Reset()
func (*TopPodRequest) String ¶
func (x *TopPodRequest) String() string
func (*TopPodRequest) Validate ¶
func (m *TopPodRequest) Validate() error
Validate checks the field values on TopPodRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*TopPodRequest) ValidateAll ¶
func (m *TopPodRequest) ValidateAll() error
ValidateAll checks the field values on TopPodRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in TopPodRequestMultiError, or nil if none found.
type TopPodRequestMultiError ¶
type TopPodRequestMultiError []error
TopPodRequestMultiError is an error wrapping multiple validation errors returned by TopPodRequest.ValidateAll() if the designated constraints aren't met.
func (TopPodRequestMultiError) AllErrors ¶
func (m TopPodRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (TopPodRequestMultiError) Error ¶
func (m TopPodRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type TopPodRequestValidationError ¶
type TopPodRequestValidationError struct {
// contains filtered or unexported fields
}
TopPodRequestValidationError is the validation error returned by TopPodRequest.Validate if the designated constraints aren't met.
func (TopPodRequestValidationError) Cause ¶
func (e TopPodRequestValidationError) Cause() error
Cause function returns cause value.
func (TopPodRequestValidationError) Error ¶
func (e TopPodRequestValidationError) Error() string
Error satisfies the builtin error interface
func (TopPodRequestValidationError) ErrorName ¶
func (e TopPodRequestValidationError) ErrorName() string
ErrorName returns error name.
func (TopPodRequestValidationError) Field ¶
func (e TopPodRequestValidationError) Field() string
Field function returns field value.
func (TopPodRequestValidationError) Key ¶
func (e TopPodRequestValidationError) Key() bool
Key function returns key value.
func (TopPodRequestValidationError) Reason ¶
func (e TopPodRequestValidationError) Reason() string
Reason function returns reason value.
type TopPodResponse ¶
type TopPodResponse struct { Cpu float64 `protobuf:"fixed64,1,opt,name=cpu,proto3" json:"cpu,omitempty"` Memory float64 `protobuf:"fixed64,2,opt,name=memory,proto3" json:"memory,omitempty"` HumanizeCpu string `protobuf:"bytes,3,opt,name=humanize_cpu,json=humanizeCpu,proto3" json:"humanize_cpu,omitempty"` HumanizeMemory string `protobuf:"bytes,4,opt,name=humanize_memory,json=humanizeMemory,proto3" json:"humanize_memory,omitempty"` Time string `protobuf:"bytes,5,opt,name=time,proto3" json:"time,omitempty"` Length int32 `protobuf:"varint,6,opt,name=length,proto3" json:"length,omitempty"` // contains filtered or unexported fields }
func (*TopPodResponse) Descriptor
deprecated
func (*TopPodResponse) Descriptor() ([]byte, []int)
Deprecated: Use TopPodResponse.ProtoReflect.Descriptor instead.
func (*TopPodResponse) GetCpu ¶
func (x *TopPodResponse) GetCpu() float64
func (*TopPodResponse) GetHumanizeCpu ¶
func (x *TopPodResponse) GetHumanizeCpu() string
func (*TopPodResponse) GetHumanizeMemory ¶
func (x *TopPodResponse) GetHumanizeMemory() string
func (*TopPodResponse) GetLength ¶
func (x *TopPodResponse) GetLength() int32
func (*TopPodResponse) GetMemory ¶
func (x *TopPodResponse) GetMemory() float64
func (*TopPodResponse) GetTime ¶
func (x *TopPodResponse) GetTime() string
func (*TopPodResponse) ProtoMessage ¶
func (*TopPodResponse) ProtoMessage()
func (*TopPodResponse) ProtoReflect ¶
func (x *TopPodResponse) ProtoReflect() protoreflect.Message
func (*TopPodResponse) Reset ¶
func (x *TopPodResponse) Reset()
func (*TopPodResponse) String ¶
func (x *TopPodResponse) String() string
func (*TopPodResponse) Validate ¶
func (m *TopPodResponse) Validate() error
Validate checks the field values on TopPodResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*TopPodResponse) ValidateAll ¶
func (m *TopPodResponse) ValidateAll() error
ValidateAll checks the field values on TopPodResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in TopPodResponseMultiError, or nil if none found.
type TopPodResponseMultiError ¶
type TopPodResponseMultiError []error
TopPodResponseMultiError is an error wrapping multiple validation errors returned by TopPodResponse.ValidateAll() if the designated constraints aren't met.
func (TopPodResponseMultiError) AllErrors ¶
func (m TopPodResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (TopPodResponseMultiError) Error ¶
func (m TopPodResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type TopPodResponseValidationError ¶
type TopPodResponseValidationError struct {
// contains filtered or unexported fields
}
TopPodResponseValidationError is the validation error returned by TopPodResponse.Validate if the designated constraints aren't met.
func (TopPodResponseValidationError) Cause ¶
func (e TopPodResponseValidationError) Cause() error
Cause function returns cause value.
func (TopPodResponseValidationError) Error ¶
func (e TopPodResponseValidationError) Error() string
Error satisfies the builtin error interface
func (TopPodResponseValidationError) ErrorName ¶
func (e TopPodResponseValidationError) ErrorName() string
ErrorName returns error name.
func (TopPodResponseValidationError) Field ¶
func (e TopPodResponseValidationError) Field() string
Field function returns field value.
func (TopPodResponseValidationError) Key ¶
func (e TopPodResponseValidationError) Key() bool
Key function returns key value.
func (TopPodResponseValidationError) Reason ¶
func (e TopPodResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedMetricsServer ¶
type UnimplementedMetricsServer struct { }
UnimplementedMetricsServer must be embedded to have forward compatible implementations.
func (UnimplementedMetricsServer) CpuMemoryInNamespace ¶
func (UnimplementedMetricsServer) CpuMemoryInNamespace(context.Context, *CpuMemoryInNamespaceRequest) (*CpuMemoryInNamespaceResponse, error)
func (UnimplementedMetricsServer) CpuMemoryInProject ¶
func (UnimplementedMetricsServer) CpuMemoryInProject(context.Context, *CpuMemoryInProjectRequest) (*CpuMemoryInProjectResponse, error)
func (UnimplementedMetricsServer) StreamTopPod ¶
func (UnimplementedMetricsServer) StreamTopPod(*TopPodRequest, Metrics_StreamTopPodServer) error
func (UnimplementedMetricsServer) TopPod ¶
func (UnimplementedMetricsServer) TopPod(context.Context, *TopPodRequest) (*TopPodResponse, error)
type UnsafeMetricsServer ¶
type UnsafeMetricsServer interface {
// contains filtered or unexported methods
}
UnsafeMetricsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MetricsServer will result in compilation errors.