api

package
v2.9.3 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_metrics_proto protoreflect.FileDescriptor
View Source
var MetricsService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.MetricsService",
	HandlerType: (*MetricsServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetMetrics",
			Handler:    _MetricsService_GetMetrics_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "metrics.proto",
}

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

Functions

func RegisterMetricsServiceServer

func RegisterMetricsServiceServer(s grpc.ServiceRegistrar, srv MetricsServiceServer)

Types

type MetricsServiceClient

type MetricsServiceClient interface {
	GetMetrics(ctx context.Context, in *ScaledObjectRef, opts ...grpc.CallOption) (*Response, error)
}

MetricsServiceClient is the client API for MetricsService 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 MetricsServiceServer

type MetricsServiceServer interface {
	GetMetrics(context.Context, *ScaledObjectRef) (*Response, error)
	// contains filtered or unexported methods
}

MetricsServiceServer is the server API for MetricsService service. All implementations must embed UnimplementedMetricsServiceServer for forward compatibility

type PromMetricsMsg

type PromMetricsMsg struct {
	ScaledObjectErr bool               `protobuf:"varint,1,opt,name=scaledObjectErr,proto3" json:"scaledObjectErr,omitempty"`
	ScalerMetric    []*ScalerMetricMsg `protobuf:"bytes,2,rep,name=scalerMetric,proto3" json:"scalerMetric,omitempty"`
	ScalerError     []*ScalerErrorMsg  `protobuf:"bytes,3,rep,name=scalerError,proto3" json:"scalerError,omitempty"`
	// contains filtered or unexported fields
}

[DEPRECATED] PromMetricsMsg provides metrics for deprecated Prometheus Metrics in Metrics Server

func (*PromMetricsMsg) Descriptor deprecated

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

Deprecated: Use PromMetricsMsg.ProtoReflect.Descriptor instead.

func (*PromMetricsMsg) GetScaledObjectErr

func (x *PromMetricsMsg) GetScaledObjectErr() bool

func (*PromMetricsMsg) GetScalerError

func (x *PromMetricsMsg) GetScalerError() []*ScalerErrorMsg

func (*PromMetricsMsg) GetScalerMetric

func (x *PromMetricsMsg) GetScalerMetric() []*ScalerMetricMsg

func (*PromMetricsMsg) ProtoMessage

func (*PromMetricsMsg) ProtoMessage()

func (*PromMetricsMsg) ProtoReflect

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

func (*PromMetricsMsg) Reset

func (x *PromMetricsMsg) Reset()

func (*PromMetricsMsg) String

func (x *PromMetricsMsg) String() string

type Response

type Response struct {
	Metrics     *v1beta1.ExternalMetricValueList `protobuf:"bytes,1,opt,name=metrics,proto3" json:"metrics,omitempty"`
	PromMetrics *PromMetricsMsg                  `protobuf:"bytes,2,opt,name=promMetrics,proto3" json:"promMetrics,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetMetrics

func (x *Response) GetMetrics() *v1beta1.ExternalMetricValueList

func (*Response) GetPromMetrics

func (x *Response) GetPromMetrics() *PromMetricsMsg

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type ScaledObjectRef

type ScaledObjectRef struct {
	Name       string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Namespace  string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	MetricName string `protobuf:"bytes,3,opt,name=metricName,proto3" json:"metricName,omitempty"`
	// contains filtered or unexported fields
}

func (*ScaledObjectRef) Descriptor deprecated

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

Deprecated: Use ScaledObjectRef.ProtoReflect.Descriptor instead.

func (*ScaledObjectRef) GetMetricName

func (x *ScaledObjectRef) GetMetricName() string

func (*ScaledObjectRef) GetName

func (x *ScaledObjectRef) GetName() string

func (*ScaledObjectRef) GetNamespace

func (x *ScaledObjectRef) GetNamespace() string

func (*ScaledObjectRef) ProtoMessage

func (*ScaledObjectRef) ProtoMessage()

func (*ScaledObjectRef) ProtoReflect

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

func (*ScaledObjectRef) Reset

func (x *ScaledObjectRef) Reset()

func (*ScaledObjectRef) String

func (x *ScaledObjectRef) String() string

type ScalerErrorMsg

type ScalerErrorMsg struct {
	ScalerName  string `protobuf:"bytes,1,opt,name=scalerName,proto3" json:"scalerName,omitempty"`
	ScalerIndex int32  `protobuf:"varint,2,opt,name=scalerIndex,proto3" json:"scalerIndex,omitempty"`
	MetricName  string `protobuf:"bytes,3,opt,name=metricName,proto3" json:"metricName,omitempty"`
	Error       bool   `protobuf:"varint,4,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*ScalerErrorMsg) Descriptor deprecated

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

Deprecated: Use ScalerErrorMsg.ProtoReflect.Descriptor instead.

func (*ScalerErrorMsg) GetError

func (x *ScalerErrorMsg) GetError() bool

func (*ScalerErrorMsg) GetMetricName

func (x *ScalerErrorMsg) GetMetricName() string

func (*ScalerErrorMsg) GetScalerIndex

func (x *ScalerErrorMsg) GetScalerIndex() int32

func (*ScalerErrorMsg) GetScalerName

func (x *ScalerErrorMsg) GetScalerName() string

func (*ScalerErrorMsg) ProtoMessage

func (*ScalerErrorMsg) ProtoMessage()

func (*ScalerErrorMsg) ProtoReflect

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

func (*ScalerErrorMsg) Reset

func (x *ScalerErrorMsg) Reset()

func (*ScalerErrorMsg) String

func (x *ScalerErrorMsg) String() string

type ScalerMetricMsg

type ScalerMetricMsg struct {
	ScalerName  string  `protobuf:"bytes,1,opt,name=scalerName,proto3" json:"scalerName,omitempty"`
	ScalerIndex int32   `protobuf:"varint,2,opt,name=scalerIndex,proto3" json:"scalerIndex,omitempty"`
	MetricName  string  `protobuf:"bytes,3,opt,name=metricName,proto3" json:"metricName,omitempty"`
	MetricValue float32 `protobuf:"fixed32,4,opt,name=metricValue,proto3" json:"metricValue,omitempty"`
	// contains filtered or unexported fields
}

func (*ScalerMetricMsg) Descriptor deprecated

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

Deprecated: Use ScalerMetricMsg.ProtoReflect.Descriptor instead.

func (*ScalerMetricMsg) GetMetricName

func (x *ScalerMetricMsg) GetMetricName() string

func (*ScalerMetricMsg) GetMetricValue

func (x *ScalerMetricMsg) GetMetricValue() float32

func (*ScalerMetricMsg) GetScalerIndex

func (x *ScalerMetricMsg) GetScalerIndex() int32

func (*ScalerMetricMsg) GetScalerName

func (x *ScalerMetricMsg) GetScalerName() string

func (*ScalerMetricMsg) ProtoMessage

func (*ScalerMetricMsg) ProtoMessage()

func (*ScalerMetricMsg) ProtoReflect

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

func (*ScalerMetricMsg) Reset

func (x *ScalerMetricMsg) Reset()

func (*ScalerMetricMsg) String

func (x *ScalerMetricMsg) String() string

type UnimplementedMetricsServiceServer

type UnimplementedMetricsServiceServer struct {
}

UnimplementedMetricsServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedMetricsServiceServer) GetMetrics

type UnsafeMetricsServiceServer

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

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

Jump to

Keyboard shortcuts

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