210 lines
7.2 KiB
Go
210 lines
7.2 KiB
Go
|
// Code generated by protoc-gen-go.
|
||
|
// source: remote.proto
|
||
|
// DO NOT EDIT!
|
||
|
|
||
|
/*
|
||
|
Package remote is a generated protocol buffer package.
|
||
|
|
||
|
It is generated from these files:
|
||
|
remote.proto
|
||
|
|
||
|
It has these top-level messages:
|
||
|
Sample
|
||
|
LabelPair
|
||
|
TimeSeries
|
||
|
WriteRequest
|
||
|
WriteResponse
|
||
|
*/
|
||
|
package remote
|
||
|
|
||
|
import proto "github.com/golang/protobuf/proto"
|
||
|
import fmt "fmt"
|
||
|
import math "math"
|
||
|
|
||
|
import (
|
||
|
context "golang.org/x/net/context"
|
||
|
grpc "google.golang.org/grpc"
|
||
|
)
|
||
|
|
||
|
// Reference imports to suppress errors if they are not otherwise used.
|
||
|
var _ = proto.Marshal
|
||
|
var _ = fmt.Errorf
|
||
|
var _ = math.Inf
|
||
|
|
||
|
// This is a compile-time assertion to ensure that this generated file
|
||
|
// is compatible with the proto package it is being compiled against.
|
||
|
// A compilation error at this line likely means your copy of the
|
||
|
// proto package needs to be updated.
|
||
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
||
|
|
||
|
type Sample struct {
|
||
|
Value float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`
|
||
|
TimestampMs int64 `protobuf:"varint,2,opt,name=timestamp_ms,json=timestampMs" json:"timestamp_ms,omitempty"`
|
||
|
}
|
||
|
|
||
|
func (m *Sample) Reset() { *m = Sample{} }
|
||
|
func (m *Sample) String() string { return proto.CompactTextString(m) }
|
||
|
func (*Sample) ProtoMessage() {}
|
||
|
func (*Sample) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
||
|
|
||
|
type LabelPair struct {
|
||
|
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
|
||
|
Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
|
||
|
}
|
||
|
|
||
|
func (m *LabelPair) Reset() { *m = LabelPair{} }
|
||
|
func (m *LabelPair) String() string { return proto.CompactTextString(m) }
|
||
|
func (*LabelPair) ProtoMessage() {}
|
||
|
func (*LabelPair) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
||
|
|
||
|
type TimeSeries struct {
|
||
|
Labels []*LabelPair `protobuf:"bytes,1,rep,name=labels" json:"labels,omitempty"`
|
||
|
// Sorted by time, oldest sample first.
|
||
|
Samples []*Sample `protobuf:"bytes,2,rep,name=samples" json:"samples,omitempty"`
|
||
|
}
|
||
|
|
||
|
func (m *TimeSeries) Reset() { *m = TimeSeries{} }
|
||
|
func (m *TimeSeries) String() string { return proto.CompactTextString(m) }
|
||
|
func (*TimeSeries) ProtoMessage() {}
|
||
|
func (*TimeSeries) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
|
||
|
|
||
|
func (m *TimeSeries) GetLabels() []*LabelPair {
|
||
|
if m != nil {
|
||
|
return m.Labels
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (m *TimeSeries) GetSamples() []*Sample {
|
||
|
if m != nil {
|
||
|
return m.Samples
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
type WriteRequest struct {
|
||
|
Timeseries []*TimeSeries `protobuf:"bytes,1,rep,name=timeseries" json:"timeseries,omitempty"`
|
||
|
}
|
||
|
|
||
|
func (m *WriteRequest) Reset() { *m = WriteRequest{} }
|
||
|
func (m *WriteRequest) String() string { return proto.CompactTextString(m) }
|
||
|
func (*WriteRequest) ProtoMessage() {}
|
||
|
func (*WriteRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
|
||
|
|
||
|
func (m *WriteRequest) GetTimeseries() []*TimeSeries {
|
||
|
if m != nil {
|
||
|
return m.Timeseries
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
type WriteResponse struct {
|
||
|
}
|
||
|
|
||
|
func (m *WriteResponse) Reset() { *m = WriteResponse{} }
|
||
|
func (m *WriteResponse) String() string { return proto.CompactTextString(m) }
|
||
|
func (*WriteResponse) ProtoMessage() {}
|
||
|
func (*WriteResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
|
||
|
|
||
|
func init() {
|
||
|
proto.RegisterType((*Sample)(nil), "remote.Sample")
|
||
|
proto.RegisterType((*LabelPair)(nil), "remote.LabelPair")
|
||
|
proto.RegisterType((*TimeSeries)(nil), "remote.TimeSeries")
|
||
|
proto.RegisterType((*WriteRequest)(nil), "remote.WriteRequest")
|
||
|
proto.RegisterType((*WriteResponse)(nil), "remote.WriteResponse")
|
||
|
}
|
||
|
|
||
|
// Reference imports to suppress errors if they are not otherwise used.
|
||
|
var _ context.Context
|
||
|
var _ grpc.ClientConn
|
||
|
|
||
|
// This is a compile-time assertion to ensure that this generated file
|
||
|
// is compatible with the grpc package it is being compiled against.
|
||
|
const _ = grpc.SupportPackageIsVersion3
|
||
|
|
||
|
// Client API for Write service
|
||
|
|
||
|
type WriteClient interface {
|
||
|
Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error)
|
||
|
}
|
||
|
|
||
|
type writeClient struct {
|
||
|
cc *grpc.ClientConn
|
||
|
}
|
||
|
|
||
|
func NewWriteClient(cc *grpc.ClientConn) WriteClient {
|
||
|
return &writeClient{cc}
|
||
|
}
|
||
|
|
||
|
func (c *writeClient) Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error) {
|
||
|
out := new(WriteResponse)
|
||
|
err := grpc.Invoke(ctx, "/remote.Write/Write", in, out, c.cc, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
// Server API for Write service
|
||
|
|
||
|
type WriteServer interface {
|
||
|
Write(context.Context, *WriteRequest) (*WriteResponse, error)
|
||
|
}
|
||
|
|
||
|
func RegisterWriteServer(s *grpc.Server, srv WriteServer) {
|
||
|
s.RegisterService(&_Write_serviceDesc, srv)
|
||
|
}
|
||
|
|
||
|
func _Write_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(WriteRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(WriteServer).Write(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/remote.Write/Write",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(WriteServer).Write(ctx, req.(*WriteRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
var _Write_serviceDesc = grpc.ServiceDesc{
|
||
|
ServiceName: "remote.Write",
|
||
|
HandlerType: (*WriteServer)(nil),
|
||
|
Methods: []grpc.MethodDesc{
|
||
|
{
|
||
|
MethodName: "Write",
|
||
|
Handler: _Write_Write_Handler,
|
||
|
},
|
||
|
},
|
||
|
Streams: []grpc.StreamDesc{},
|
||
|
Metadata: fileDescriptor0,
|
||
|
}
|
||
|
|
||
|
func init() { proto.RegisterFile("remote.proto", fileDescriptor0) }
|
||
|
|
||
|
var fileDescriptor0 = []byte{
|
||
|
// 250 bytes of a gzipped FileDescriptorProto
|
||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x5c, 0x91, 0x4f, 0x4b, 0x03, 0x31,
|
||
|
0x10, 0xc5, 0xdd, 0xd6, 0xae, 0x74, 0xba, 0x2a, 0x0e, 0x15, 0x8a, 0x27, 0xcd, 0x69, 0xbd, 0xf4,
|
||
|
0xb0, 0xa2, 0x57, 0xd1, 0xb3, 0x82, 0xa4, 0x82, 0x47, 0x49, 0x61, 0x0e, 0x0b, 0x9b, 0x66, 0xcd,
|
||
|
0xa4, 0x7e, 0x7e, 0xb3, 0xf9, 0xd3, 0x2e, 0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