prometheus/storage/remote/generic/generic.pb.go
Brian Brazil 36d2c4bd0b Add generic write path using grpc.
This uses a new proto format, with scope for multiple samples per
timeseries in future. This will allow users to pump samples out to
whatever they like without having to change the core Prometheus code.

There's also an example receiver to save users figuring out the
boilerplate themselves.
2016-08-30 17:19:18 +02:00

212 lines
7.7 KiB
Go

// Code generated by protoc-gen-go.
// source: generic.proto
// DO NOT EDIT!
/*
Package generic is a generated protocol buffer package.
It is generated from these files:
generic.proto
It has these top-level messages:
Sample
LabelPair
TimeSeries
GenericWriteRequest
GenericWriteResponse
*/
package generic
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 {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
Labels []*LabelPair `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty"`
// Sorted by time, oldest sample first.
Samples []*Sample `protobuf:"bytes,3,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 GenericWriteRequest struct {
Timeseries []*TimeSeries `protobuf:"bytes,1,rep,name=timeseries" json:"timeseries,omitempty"`
}
func (m *GenericWriteRequest) Reset() { *m = GenericWriteRequest{} }
func (m *GenericWriteRequest) String() string { return proto.CompactTextString(m) }
func (*GenericWriteRequest) ProtoMessage() {}
func (*GenericWriteRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *GenericWriteRequest) GetTimeseries() []*TimeSeries {
if m != nil {
return m.Timeseries
}
return nil
}
type GenericWriteResponse struct {
}
func (m *GenericWriteResponse) Reset() { *m = GenericWriteResponse{} }
func (m *GenericWriteResponse) String() string { return proto.CompactTextString(m) }
func (*GenericWriteResponse) ProtoMessage() {}
func (*GenericWriteResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func init() {
proto.RegisterType((*Sample)(nil), "generic.Sample")
proto.RegisterType((*LabelPair)(nil), "generic.LabelPair")
proto.RegisterType((*TimeSeries)(nil), "generic.TimeSeries")
proto.RegisterType((*GenericWriteRequest)(nil), "generic.GenericWriteRequest")
proto.RegisterType((*GenericWriteResponse)(nil), "generic.GenericWriteResponse")
}
// 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 GenericWrite service
type GenericWriteClient interface {
Write(ctx context.Context, in *GenericWriteRequest, opts ...grpc.CallOption) (*GenericWriteResponse, error)
}
type genericWriteClient struct {
cc *grpc.ClientConn
}
func NewGenericWriteClient(cc *grpc.ClientConn) GenericWriteClient {
return &genericWriteClient{cc}
}
func (c *genericWriteClient) Write(ctx context.Context, in *GenericWriteRequest, opts ...grpc.CallOption) (*GenericWriteResponse, error) {
out := new(GenericWriteResponse)
err := grpc.Invoke(ctx, "/generic.GenericWrite/Write", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for GenericWrite service
type GenericWriteServer interface {
Write(context.Context, *GenericWriteRequest) (*GenericWriteResponse, error)
}
func RegisterGenericWriteServer(s *grpc.Server, srv GenericWriteServer) {
s.RegisterService(&_GenericWrite_serviceDesc, srv)
}
func _GenericWrite_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GenericWriteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GenericWriteServer).Write(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/generic.GenericWrite/Write",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GenericWriteServer).Write(ctx, req.(*GenericWriteRequest))
}
return interceptor(ctx, in, info, handler)
}
var _GenericWrite_serviceDesc = grpc.ServiceDesc{
ServiceName: "generic.GenericWrite",
HandlerType: (*GenericWriteServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Write",
Handler: _GenericWrite_Write_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: fileDescriptor0,
}
func init() { proto.RegisterFile("generic.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 264 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x91, 0x4f, 0x4b, 0xc3, 0x40,
0x10, 0xc5, 0x4d, 0x63, 0x53, 0xfa, 0x5a, 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