ignore protocol.pb.go as it's auto generated
parent
d11578008b
commit
58d062c3be
|
@ -20,6 +20,7 @@ a.out
|
|||
src/parser/lex.yy.c
|
||||
src/parser/y.tab.h
|
||||
src/parser/y.tab.c
|
||||
src/protocol/protocol.pb.go
|
||||
build/
|
||||
|
||||
# executables
|
||||
|
|
|
@ -1,496 +0,0 @@
|
|||
// Code generated by protoc-gen-go.
|
||||
// source: src/protocol/protocol.proto
|
||||
// DO NOT EDIT!
|
||||
|
||||
package protocol
|
||||
|
||||
import proto "code.google.com/p/goprotobuf/proto"
|
||||
import json "encoding/json"
|
||||
import math "math"
|
||||
|
||||
// Reference proto, json, and math imports to suppress error if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = &json.SyntaxError{}
|
||||
var _ = math.Inf
|
||||
|
||||
type Request_Type int32
|
||||
|
||||
const (
|
||||
Request_QUERY Request_Type = 1
|
||||
Request_REPLICATION_WRITE Request_Type = 2
|
||||
Request_PROXY_WRITE Request_Type = 3
|
||||
Request_REPLICATION_DELETE Request_Type = 4
|
||||
Request_PROXY_DELETE Request_Type = 5
|
||||
Request_REPLICATION_REPLAY Request_Type = 6
|
||||
Request_LIST_SERIES Request_Type = 7
|
||||
Request_SEQUENCE_NUMBER Request_Type = 8
|
||||
Request_PROXY_DROP_DATABASE Request_Type = 9
|
||||
Request_REPLICATION_DROP_DATABASE Request_Type = 10
|
||||
Request_PROXY_DROP_SERIES Request_Type = 11
|
||||
Request_REPLICATION_DROP_SERIES Request_Type = 12
|
||||
)
|
||||
|
||||
var Request_Type_name = map[int32]string{
|
||||
1: "QUERY",
|
||||
2: "REPLICATION_WRITE",
|
||||
3: "PROXY_WRITE",
|
||||
4: "REPLICATION_DELETE",
|
||||
5: "PROXY_DELETE",
|
||||
6: "REPLICATION_REPLAY",
|
||||
7: "LIST_SERIES",
|
||||
8: "SEQUENCE_NUMBER",
|
||||
9: "PROXY_DROP_DATABASE",
|
||||
10: "REPLICATION_DROP_DATABASE",
|
||||
11: "PROXY_DROP_SERIES",
|
||||
12: "REPLICATION_DROP_SERIES",
|
||||
}
|
||||
var Request_Type_value = map[string]int32{
|
||||
"QUERY": 1,
|
||||
"REPLICATION_WRITE": 2,
|
||||
"PROXY_WRITE": 3,
|
||||
"REPLICATION_DELETE": 4,
|
||||
"PROXY_DELETE": 5,
|
||||
"REPLICATION_REPLAY": 6,
|
||||
"LIST_SERIES": 7,
|
||||
"SEQUENCE_NUMBER": 8,
|
||||
"PROXY_DROP_DATABASE": 9,
|
||||
"REPLICATION_DROP_DATABASE": 10,
|
||||
"PROXY_DROP_SERIES": 11,
|
||||
"REPLICATION_DROP_SERIES": 12,
|
||||
}
|
||||
|
||||
func (x Request_Type) Enum() *Request_Type {
|
||||
p := new(Request_Type)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
func (x Request_Type) String() string {
|
||||
return proto.EnumName(Request_Type_name, int32(x))
|
||||
}
|
||||
func (x *Request_Type) UnmarshalJSON(data []byte) error {
|
||||
value, err := proto.UnmarshalJSONEnum(Request_Type_value, data, "Request_Type")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*x = Request_Type(value)
|
||||
return nil
|
||||
}
|
||||
|
||||
type Response_Type int32
|
||||
|
||||
const (
|
||||
Response_QUERY Response_Type = 1
|
||||
Response_WRITE_OK Response_Type = 2
|
||||
Response_END_STREAM Response_Type = 3
|
||||
Response_REPLICATION_REPLAY Response_Type = 4
|
||||
Response_REPLICATION_REPLAY_END Response_Type = 5
|
||||
Response_LIST_SERIES Response_Type = 6
|
||||
Response_SEQUENCE_NUMBER Response_Type = 7
|
||||
)
|
||||
|
||||
var Response_Type_name = map[int32]string{
|
||||
1: "QUERY",
|
||||
2: "WRITE_OK",
|
||||
3: "END_STREAM",
|
||||
4: "REPLICATION_REPLAY",
|
||||
5: "REPLICATION_REPLAY_END",
|
||||
6: "LIST_SERIES",
|
||||
7: "SEQUENCE_NUMBER",
|
||||
}
|
||||
var Response_Type_value = map[string]int32{
|
||||
"QUERY": 1,
|
||||
"WRITE_OK": 2,
|
||||
"END_STREAM": 3,
|
||||
"REPLICATION_REPLAY": 4,
|
||||
"REPLICATION_REPLAY_END": 5,
|
||||
"LIST_SERIES": 6,
|
||||
"SEQUENCE_NUMBER": 7,
|
||||
}
|
||||
|
||||
func (x Response_Type) Enum() *Response_Type {
|
||||
p := new(Response_Type)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
func (x Response_Type) String() string {
|
||||
return proto.EnumName(Response_Type_name, int32(x))
|
||||
}
|
||||
func (x *Response_Type) UnmarshalJSON(data []byte) error {
|
||||
value, err := proto.UnmarshalJSONEnum(Response_Type_value, data, "Response_Type")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*x = Response_Type(value)
|
||||
return nil
|
||||
}
|
||||
|
||||
type Response_ErrorCode int32
|
||||
|
||||
const (
|
||||
Response_REQUEST_TOO_LARGE Response_ErrorCode = 1
|
||||
Response_INTERNAL_ERROR Response_ErrorCode = 2
|
||||
)
|
||||
|
||||
var Response_ErrorCode_name = map[int32]string{
|
||||
1: "REQUEST_TOO_LARGE",
|
||||
2: "INTERNAL_ERROR",
|
||||
}
|
||||
var Response_ErrorCode_value = map[string]int32{
|
||||
"REQUEST_TOO_LARGE": 1,
|
||||
"INTERNAL_ERROR": 2,
|
||||
}
|
||||
|
||||
func (x Response_ErrorCode) Enum() *Response_ErrorCode {
|
||||
p := new(Response_ErrorCode)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
func (x Response_ErrorCode) String() string {
|
||||
return proto.EnumName(Response_ErrorCode_name, int32(x))
|
||||
}
|
||||
func (x *Response_ErrorCode) UnmarshalJSON(data []byte) error {
|
||||
value, err := proto.UnmarshalJSONEnum(Response_ErrorCode_value, data, "Response_ErrorCode")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*x = Response_ErrorCode(value)
|
||||
return nil
|
||||
}
|
||||
|
||||
type FieldValue struct {
|
||||
StringValue *string `protobuf:"bytes,1,opt,name=string_value" json:"string_value,omitempty"`
|
||||
DoubleValue *float64 `protobuf:"fixed64,3,opt,name=double_value" json:"double_value,omitempty"`
|
||||
BoolValue *bool `protobuf:"varint,4,opt,name=bool_value" json:"bool_value,omitempty"`
|
||||
Int64Value *int64 `protobuf:"varint,5,opt,name=int64_value" json:"int64_value,omitempty"`
|
||||
IsNull *bool `protobuf:"varint,6,opt,name=is_null" json:"is_null,omitempty"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
}
|
||||
|
||||
func (m *FieldValue) Reset() { *m = FieldValue{} }
|
||||
func (m *FieldValue) String() string { return proto.CompactTextString(m) }
|
||||
func (*FieldValue) ProtoMessage() {}
|
||||
|
||||
func (m *FieldValue) GetStringValue() string {
|
||||
if m != nil && m.StringValue != nil {
|
||||
return *m.StringValue
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *FieldValue) GetDoubleValue() float64 {
|
||||
if m != nil && m.DoubleValue != nil {
|
||||
return *m.DoubleValue
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *FieldValue) GetBoolValue() bool {
|
||||
if m != nil && m.BoolValue != nil {
|
||||
return *m.BoolValue
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *FieldValue) GetInt64Value() int64 {
|
||||
if m != nil && m.Int64Value != nil {
|
||||
return *m.Int64Value
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *FieldValue) GetIsNull() bool {
|
||||
if m != nil && m.IsNull != nil {
|
||||
return *m.IsNull
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type Point struct {
|
||||
Values []*FieldValue `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
|
||||
Timestamp *int64 `protobuf:"varint,2,opt,name=timestamp" json:"timestamp,omitempty"`
|
||||
SequenceNumber *uint64 `protobuf:"varint,3,opt,name=sequence_number" json:"sequence_number,omitempty"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Point) Reset() { *m = Point{} }
|
||||
func (m *Point) String() string { return proto.CompactTextString(m) }
|
||||
func (*Point) ProtoMessage() {}
|
||||
|
||||
func (m *Point) GetValues() []*FieldValue {
|
||||
if m != nil {
|
||||
return m.Values
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Point) GetTimestamp() int64 {
|
||||
if m != nil && m.Timestamp != nil {
|
||||
return *m.Timestamp
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Point) GetSequenceNumber() uint64 {
|
||||
if m != nil && m.SequenceNumber != nil {
|
||||
return *m.SequenceNumber
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type Series struct {
|
||||
Points []*Point `protobuf:"bytes,1,rep,name=points" json:"points,omitempty"`
|
||||
Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"`
|
||||
Fields []string `protobuf:"bytes,3,rep,name=fields" json:"fields,omitempty"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Series) Reset() { *m = Series{} }
|
||||
func (m *Series) String() string { return proto.CompactTextString(m) }
|
||||
func (*Series) ProtoMessage() {}
|
||||
|
||||
func (m *Series) GetPoints() []*Point {
|
||||
if m != nil {
|
||||
return m.Points
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Series) GetName() string {
|
||||
if m != nil && m.Name != nil {
|
||||
return *m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Series) GetFields() []string {
|
||||
if m != nil {
|
||||
return m.Fields
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type QueryResponseChunk struct {
|
||||
Series *Series `protobuf:"bytes,1,opt,name=series" json:"series,omitempty"`
|
||||
Done *bool `protobuf:"varint,2,opt,name=done" json:"done,omitempty"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
}
|
||||
|
||||
func (m *QueryResponseChunk) Reset() { *m = QueryResponseChunk{} }
|
||||
func (m *QueryResponseChunk) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryResponseChunk) ProtoMessage() {}
|
||||
|
||||
func (m *QueryResponseChunk) GetSeries() *Series {
|
||||
if m != nil {
|
||||
return m.Series
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *QueryResponseChunk) GetDone() bool {
|
||||
if m != nil && m.Done != nil {
|
||||
return *m.Done
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type Request struct {
|
||||
Id *uint32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
|
||||
Type *Request_Type `protobuf:"varint,2,req,name=type,enum=protocol.Request_Type" json:"type,omitempty"`
|
||||
Database *string `protobuf:"bytes,3,req,name=database" json:"database,omitempty"`
|
||||
Series *Series `protobuf:"bytes,4,opt,name=series" json:"series,omitempty"`
|
||||
// only write and delete requests get sequenceNumbers assigned. These are used to
|
||||
// ensure that the receiving server is up to date
|
||||
SequenceNumber *uint64 `protobuf:"varint,5,opt,name=sequence_number" json:"sequence_number,omitempty"`
|
||||
// the originzatingServerId is only used for writes and deletes. It is the id of the
|
||||
// server that first committed the write to its local datastore. It is used for
|
||||
// the other servers in the hash ring to ensure they remain consistent.
|
||||
OriginatingServerId *uint32 `protobuf:"varint,6,opt,name=originating_server_id" json:"originating_server_id,omitempty"`
|
||||
ClusterVersion *uint32 `protobuf:"varint,10,opt,name=cluster_version" json:"cluster_version,omitempty"`
|
||||
Query *string `protobuf:"bytes,7,opt,name=query" json:"query,omitempty"`
|
||||
UserName *string `protobuf:"bytes,8,opt,name=user_name" json:"user_name,omitempty"`
|
||||
// ringLocationsToQuery tells the server what data it should be returning.
|
||||
// for example, if the number is 1, it will only return data that is owned by
|
||||
// this server on the hash ring. If 2, it will return this server and data replicated
|
||||
// from the server directly before it on the ring. 3, etc.
|
||||
// If this field is left out, we assume that we'll be returning all data the server has
|
||||
// for the query.
|
||||
RingLocationsToQuery *uint32 `protobuf:"varint,9,opt,name=ring_locations_to_query" json:"ring_locations_to_query,omitempty"`
|
||||
// optional fields for replication replay requests. should include originating serer id
|
||||
ReplicationFactor *uint32 `protobuf:"varint,16,opt,name=replication_factor" json:"replication_factor,omitempty"`
|
||||
OwnerServerId *uint32 `protobuf:"varint,17,opt,name=owner_server_id" json:"owner_server_id,omitempty"`
|
||||
LastKnownSequenceNumber *uint64 `protobuf:"varint,18,opt,name=last_known_sequence_number" json:"last_known_sequence_number,omitempty"`
|
||||
IsDbUser *bool `protobuf:"varint,19,opt,name=is_db_user" json:"is_db_user,omitempty"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Request) Reset() { *m = Request{} }
|
||||
func (m *Request) String() string { return proto.CompactTextString(m) }
|
||||
func (*Request) ProtoMessage() {}
|
||||
|
||||
func (m *Request) GetId() uint32 {
|
||||
if m != nil && m.Id != nil {
|
||||
return *m.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Request) GetType() Request_Type {
|
||||
if m != nil && m.Type != nil {
|
||||
return *m.Type
|
||||
}
|
||||
return Request_QUERY
|
||||
}
|
||||
|
||||
func (m *Request) GetDatabase() string {
|
||||
if m != nil && m.Database != nil {
|
||||
return *m.Database
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Request) GetSeries() *Series {
|
||||
if m != nil {
|
||||
return m.Series
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Request) GetSequenceNumber() uint64 {
|
||||
if m != nil && m.SequenceNumber != nil {
|
||||
return *m.SequenceNumber
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Request) GetOriginatingServerId() uint32 {
|
||||
if m != nil && m.OriginatingServerId != nil {
|
||||
return *m.OriginatingServerId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Request) GetClusterVersion() uint32 {
|
||||
if m != nil && m.ClusterVersion != nil {
|
||||
return *m.ClusterVersion
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Request) GetQuery() string {
|
||||
if m != nil && m.Query != nil {
|
||||
return *m.Query
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Request) GetUserName() string {
|
||||
if m != nil && m.UserName != nil {
|
||||
return *m.UserName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Request) GetRingLocationsToQuery() uint32 {
|
||||
if m != nil && m.RingLocationsToQuery != nil {
|
||||
return *m.RingLocationsToQuery
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Request) GetReplicationFactor() uint32 {
|
||||
if m != nil && m.ReplicationFactor != nil {
|
||||
return *m.ReplicationFactor
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Request) GetOwnerServerId() uint32 {
|
||||
if m != nil && m.OwnerServerId != nil {
|
||||
return *m.OwnerServerId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Request) GetLastKnownSequenceNumber() uint64 {
|
||||
if m != nil && m.LastKnownSequenceNumber != nil {
|
||||
return *m.LastKnownSequenceNumber
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Request) GetIsDbUser() bool {
|
||||
if m != nil && m.IsDbUser != nil {
|
||||
return *m.IsDbUser
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type Response struct {
|
||||
Type *Response_Type `protobuf:"varint,1,req,name=type,enum=protocol.Response_Type" json:"type,omitempty"`
|
||||
RequestId *uint32 `protobuf:"varint,2,req,name=request_id" json:"request_id,omitempty"`
|
||||
Series *Series `protobuf:"bytes,3,opt,name=series" json:"series,omitempty"`
|
||||
ErrorCode *Response_ErrorCode `protobuf:"varint,4,opt,name=error_code,enum=protocol.Response_ErrorCode" json:"error_code,omitempty"`
|
||||
ErrorMessage *string `protobuf:"bytes,5,opt,name=error_message" json:"error_message,omitempty"`
|
||||
NextPointTime *int64 `protobuf:"varint,6,opt,name=nextPointTime" json:"nextPointTime,omitempty"`
|
||||
Request *Request `protobuf:"bytes,7,opt,name=request" json:"request,omitempty"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Response) Reset() { *m = Response{} }
|
||||
func (m *Response) String() string { return proto.CompactTextString(m) }
|
||||
func (*Response) ProtoMessage() {}
|
||||
|
||||
func (m *Response) GetType() Response_Type {
|
||||
if m != nil && m.Type != nil {
|
||||
return *m.Type
|
||||
}
|
||||
return Response_QUERY
|
||||
}
|
||||
|
||||
func (m *Response) GetRequestId() uint32 {
|
||||
if m != nil && m.RequestId != nil {
|
||||
return *m.RequestId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Response) GetSeries() *Series {
|
||||
if m != nil {
|
||||
return m.Series
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Response) GetErrorCode() Response_ErrorCode {
|
||||
if m != nil && m.ErrorCode != nil {
|
||||
return *m.ErrorCode
|
||||
}
|
||||
return Response_REQUEST_TOO_LARGE
|
||||
}
|
||||
|
||||
func (m *Response) GetErrorMessage() string {
|
||||
if m != nil && m.ErrorMessage != nil {
|
||||
return *m.ErrorMessage
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Response) GetNextPointTime() int64 {
|
||||
if m != nil && m.NextPointTime != nil {
|
||||
return *m.NextPointTime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *Response) GetRequest() *Request {
|
||||
if m != nil {
|
||||
return m.Request
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("protocol.Request_Type", Request_Type_name, Request_Type_value)
|
||||
proto.RegisterEnum("protocol.Response_Type", Response_Type_name, Response_Type_value)
|
||||
proto.RegisterEnum("protocol.Response_ErrorCode", Response_ErrorCode_name, Response_ErrorCode_value)
|
||||
}
|
Loading…
Reference in New Issue