Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterMetricServerServer(s grpc.ServiceRegistrar, srv MetricServerServer)
- type Metric
- func (*Metric) Descriptor() ([]byte, []int)deprecated
- func (x *Metric) GetDelta() int64
- func (x *Metric) GetID() string
- func (x *Metric) GetMType() string
- func (x *Metric) GetValue() float64
- func (*Metric) ProtoMessage()
- func (x *Metric) ProtoReflect() protoreflect.Message
- func (x *Metric) Reset()
- func (x *Metric) String() string
- type MetricServerClient
- type MetricServerServer
- type PushMetricsRequest
- func (*PushMetricsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PushMetricsRequest) GetError() string
- func (x *PushMetricsRequest) GetMetrics() []*Metric
- func (*PushMetricsRequest) ProtoMessage()
- func (x *PushMetricsRequest) ProtoReflect() protoreflect.Message
- func (x *PushMetricsRequest) Reset()
- func (x *PushMetricsRequest) String() string
- type PushMetricsResponse
- func (*PushMetricsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PushMetricsResponse) GetError() string
- func (*PushMetricsResponse) ProtoMessage()
- func (x *PushMetricsResponse) ProtoReflect() protoreflect.Message
- func (x *PushMetricsResponse) Reset()
- func (x *PushMetricsResponse) String() string
- type UnimplementedMetricServerServer
- type UnsafeMetricServerServer
Constants ¶
const (
MetricServer_PushMetrics_FullMethodName = "/exchange.MetricServer/PushMetrics"
)
Variables ¶
var File_exchange_proto protoreflect.FileDescriptor
var MetricServer_ServiceDesc = grpc.ServiceDesc{ ServiceName: "exchange.MetricServer", HandlerType: (*MetricServerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "PushMetrics", Handler: _MetricServer_PushMetrics_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "exchange.proto", }
MetricServer_ServiceDesc is the grpc.ServiceDesc for MetricServer service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMetricServerServer ¶
func RegisterMetricServerServer(s grpc.ServiceRegistrar, srv MetricServerServer)
Types ¶
type Metric ¶
type Metric struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` MType string `protobuf:"bytes,2,opt,name=MType,proto3" json:"MType,omitempty"` Delta *int64 `protobuf:"varint,3,opt,name=Delta,proto3,oneof" json:"Delta,omitempty"` Value *float64 `protobuf:"fixed64,4,opt,name=Value,proto3,oneof" json:"Value,omitempty"` // contains filtered or unexported fields }
func (*Metric) Descriptor
deprecated
func (*Metric) ProtoMessage ¶
func (*Metric) ProtoMessage()
func (*Metric) ProtoReflect ¶
func (x *Metric) ProtoReflect() protoreflect.Message
type MetricServerClient ¶
type MetricServerClient interface {
PushMetrics(ctx context.Context, in *PushMetricsRequest, opts ...grpc.CallOption) (*PushMetricsResponse, error)
}
MetricServerClient is the client API for MetricServer 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 NewMetricServerClient ¶
func NewMetricServerClient(cc grpc.ClientConnInterface) MetricServerClient
type MetricServerServer ¶
type MetricServerServer interface { PushMetrics(context.Context, *PushMetricsRequest) (*PushMetricsResponse, error) // contains filtered or unexported methods }
MetricServerServer is the server API for MetricServer service. All implementations must embed UnimplementedMetricServerServer for forward compatibility
type PushMetricsRequest ¶
type PushMetricsRequest struct { Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` Metrics []*Metric `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"` // contains filtered or unexported fields }
func (*PushMetricsRequest) Descriptor
deprecated
func (*PushMetricsRequest) Descriptor() ([]byte, []int)
Deprecated: Use PushMetricsRequest.ProtoReflect.Descriptor instead.
func (*PushMetricsRequest) GetError ¶
func (x *PushMetricsRequest) GetError() string
func (*PushMetricsRequest) GetMetrics ¶
func (x *PushMetricsRequest) GetMetrics() []*Metric
func (*PushMetricsRequest) ProtoMessage ¶
func (*PushMetricsRequest) ProtoMessage()
func (*PushMetricsRequest) ProtoReflect ¶
func (x *PushMetricsRequest) ProtoReflect() protoreflect.Message
func (*PushMetricsRequest) Reset ¶
func (x *PushMetricsRequest) Reset()
func (*PushMetricsRequest) String ¶
func (x *PushMetricsRequest) String() string
type PushMetricsResponse ¶
type PushMetricsResponse struct { Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*PushMetricsResponse) Descriptor
deprecated
func (*PushMetricsResponse) Descriptor() ([]byte, []int)
Deprecated: Use PushMetricsResponse.ProtoReflect.Descriptor instead.
func (*PushMetricsResponse) GetError ¶
func (x *PushMetricsResponse) GetError() string
func (*PushMetricsResponse) ProtoMessage ¶
func (*PushMetricsResponse) ProtoMessage()
func (*PushMetricsResponse) ProtoReflect ¶
func (x *PushMetricsResponse) ProtoReflect() protoreflect.Message
func (*PushMetricsResponse) Reset ¶
func (x *PushMetricsResponse) Reset()
func (*PushMetricsResponse) String ¶
func (x *PushMetricsResponse) String() string
type UnimplementedMetricServerServer ¶
type UnimplementedMetricServerServer struct { }
UnimplementedMetricServerServer must be embedded to have forward compatible implementations.
func (UnimplementedMetricServerServer) PushMetrics ¶
func (UnimplementedMetricServerServer) PushMetrics(context.Context, *PushMetricsRequest) (*PushMetricsResponse, error)
type UnsafeMetricServerServer ¶
type UnsafeMetricServerServer interface {
// contains filtered or unexported methods
}
UnsafeMetricServerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MetricServerServer will result in compilation errors.