api

package
v0.0.0-...-9128a6e Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_metric_proto protoreflect.FileDescriptor
View Source
var File_service_proto protoreflect.FileDescriptor
View Source
var Metrics_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Metrics",
	HandlerType: (*MetricsServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetMetrics",
			Handler:       _Metrics_GetMetrics_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "service.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 RegisterMetricsServer

func RegisterMetricsServer(s grpc.ServiceRegistrar, srv MetricsServer)

Types

type GetMetricsRequest

type GetMetricsRequest struct {
	NotifyInterval      int32 `protobuf:"varint,1,opt,name=notifyInterval,proto3" json:"notifyInterval,omitempty"`
	AverageCalcInterval int32 `protobuf:"varint,2,opt,name=averageCalcInterval,proto3" json:"averageCalcInterval,omitempty"`
	// contains filtered or unexported fields
}

func (*GetMetricsRequest) Descriptor deprecated

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

Deprecated: Use GetMetricsRequest.ProtoReflect.Descriptor instead.

func (*GetMetricsRequest) GetAverageCalcInterval

func (x *GetMetricsRequest) GetAverageCalcInterval() int32

func (*GetMetricsRequest) GetNotifyInterval

func (x *GetMetricsRequest) GetNotifyInterval() int32

func (*GetMetricsRequest) ProtoMessage

func (*GetMetricsRequest) ProtoMessage()

func (*GetMetricsRequest) ProtoReflect

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

func (*GetMetricsRequest) Reset

func (x *GetMetricsRequest) Reset()

func (*GetMetricsRequest) String

func (x *GetMetricsRequest) String() string

type GetMetricsResponse

type GetMetricsResponse struct {
	Groups []*MetricGroup `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"`
	// contains filtered or unexported fields
}

func (*GetMetricsResponse) Descriptor deprecated

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

Deprecated: Use GetMetricsResponse.ProtoReflect.Descriptor instead.

func (*GetMetricsResponse) GetGroups

func (x *GetMetricsResponse) GetGroups() []*MetricGroup

func (*GetMetricsResponse) ProtoMessage

func (*GetMetricsResponse) ProtoMessage()

func (*GetMetricsResponse) ProtoReflect

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

func (*GetMetricsResponse) Reset

func (x *GetMetricsResponse) Reset()

func (*GetMetricsResponse) String

func (x *GetMetricsResponse) String() string

type Metric

type Metric struct {
	Name      string               `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Timestamp *timestamp.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Value     float64              `protobuf:"fixed64,3,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Metric) Descriptor deprecated

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

Deprecated: Use Metric.ProtoReflect.Descriptor instead.

func (*Metric) GetName

func (x *Metric) GetName() string

func (*Metric) GetTimestamp

func (x *Metric) GetTimestamp() *timestamp.Timestamp

func (*Metric) GetValue

func (x *Metric) GetValue() float64

func (*Metric) ProtoMessage

func (*Metric) ProtoMessage()

func (*Metric) ProtoReflect

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

func (*Metric) Reset

func (x *Metric) Reset()

func (*Metric) String

func (x *Metric) String() string

type MetricGroup

type MetricGroup struct {
	Name      string               `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Timestamp *timestamp.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Metrics   []*Metric            `protobuf:"bytes,3,rep,name=metrics,proto3" json:"metrics,omitempty"`
	// contains filtered or unexported fields
}

func (*MetricGroup) Descriptor deprecated

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

Deprecated: Use MetricGroup.ProtoReflect.Descriptor instead.

func (*MetricGroup) GetMetrics

func (x *MetricGroup) GetMetrics() []*Metric

func (*MetricGroup) GetName

func (x *MetricGroup) GetName() string

func (*MetricGroup) GetTimestamp

func (x *MetricGroup) GetTimestamp() *timestamp.Timestamp

func (*MetricGroup) ProtoMessage

func (*MetricGroup) ProtoMessage()

func (*MetricGroup) ProtoReflect

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

func (*MetricGroup) Reset

func (x *MetricGroup) Reset()

func (*MetricGroup) String

func (x *MetricGroup) String() string

type MetricsClient

type MetricsClient interface {
	GetMetrics(ctx context.Context, in *GetMetricsRequest, opts ...grpc.CallOption) (Metrics_GetMetricsClient, 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 {
	GetMetrics(*GetMetricsRequest, Metrics_GetMetricsServer) error
	// contains filtered or unexported methods
}

MetricsServer is the server API for Metrics service. All implementations must embed UnimplementedMetricsServer for forward compatibility

type Metrics_GetMetricsClient

type Metrics_GetMetricsClient interface {
	Recv() (*GetMetricsResponse, error)
	grpc.ClientStream
}

type Metrics_GetMetricsServer

type Metrics_GetMetricsServer interface {
	Send(*GetMetricsResponse) error
	grpc.ServerStream
}

type UnimplementedMetricsServer

type UnimplementedMetricsServer struct {
}

UnimplementedMetricsServer must be embedded to have forward compatible implementations.

func (UnimplementedMetricsServer) GetMetrics

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.

Jump to

Keyboard shortcuts

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