protocol

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2013 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Request_Type_name = map[int32]string{
	1: "QUERY",
	2: "WRITE",
	3: "GET_SERVERS",
}
View Source
var Request_Type_value = map[string]int32{
	"QUERY":       1,
	"WRITE":       2,
	"GET_SERVERS": 3,
}
View Source
var Response_Type_name = map[int32]string{
	1: "QUERY",
	2: "WRITE_OK",
	3: "END_STREAM",
}
View Source
var Response_Type_value = map[string]int32{
	"QUERY":      1,
	"WRITE_OK":   2,
	"END_STREAM": 3,
}

Functions

func MarshalPoint

func MarshalPoint(point *Point) (data []byte, err error)

Types

type FieldValue

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"`
	XXX_unrecognized []byte   `json:"-"`
}

func (*FieldValue) GetBoolValue

func (m *FieldValue) GetBoolValue() bool

func (*FieldValue) GetDoubleValue

func (m *FieldValue) GetDoubleValue() float64

func (*FieldValue) GetInt64Value

func (m *FieldValue) GetInt64Value() int64

func (*FieldValue) GetStringValue

func (m *FieldValue) GetStringValue() string

func (*FieldValue) GetValue

func (self *FieldValue) GetValue() interface{}

func (*FieldValue) ProtoMessage

func (*FieldValue) ProtoMessage()

func (*FieldValue) Reset

func (m *FieldValue) Reset()

func (*FieldValue) String

func (m *FieldValue) String() string

type Point

type Point struct {
	Values           []*FieldValue `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
	Timestamp        *int64        `protobuf:"varint,2,req,name=timestamp" json:"timestamp,omitempty"`
	SequenceNumber   *uint32       `protobuf:"varint,3,req,name=sequence_number" json:"sequence_number,omitempty"`
	XXX_unrecognized []byte        `json:"-"`
}

func UnmarshalPoint

func UnmarshalPoint(data []byte) (point *Point, err error)

func (*Point) GetFieldValue

func (self *Point) GetFieldValue(idx int) interface{}

func (*Point) GetSequenceNumber

func (m *Point) GetSequenceNumber() uint32

func (*Point) GetTimestamp

func (m *Point) GetTimestamp() int64

func (*Point) GetTimestampInMicroseconds

func (self *Point) GetTimestampInMicroseconds() *int64

func (*Point) GetValues

func (m *Point) GetValues() []*FieldValue

func (*Point) ProtoMessage

func (*Point) ProtoMessage()

func (*Point) Reset

func (m *Point) Reset()

func (*Point) SetTimestampInMicroseconds

func (self *Point) SetTimestampInMicroseconds(t int64)

func (*Point) String

func (m *Point) String() string

type Request

type Request struct {
	Id               *int32        `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"`
	XXX_unrecognized []byte        `json:"-"`
}

func (*Request) GetId

func (m *Request) GetId() int32

func (*Request) GetType

func (m *Request) GetType() Request_Type

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

type Request_Type

type Request_Type int32
const (
	Request_QUERY       Request_Type = 1
	Request_WRITE       Request_Type = 2
	Request_GET_SERVERS Request_Type = 3
)

func (Request_Type) Enum

func (x Request_Type) Enum() *Request_Type

func (Request_Type) String

func (x Request_Type) String() string

func (*Request_Type) UnmarshalJSON

func (x *Request_Type) UnmarshalJSON(data []byte) error

type Response

type Response struct {
	Id               *int32   `protobuf:"varint,1,req,name=id" json:"id,omitempty"`
	Series           *Series  `protobuf:"bytes,2,opt,name=series" json:"series,omitempty"`
	Servers          []string `protobuf:"bytes,3,rep,name=servers" json:"servers,omitempty"`
	XXX_unrecognized []byte   `json:"-"`
}

func (*Response) GetId

func (m *Response) GetId() int32

func (*Response) GetSeries

func (m *Response) GetSeries() *Series

func (*Response) GetServers

func (m *Response) GetServers() []string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

type Response_Type

type Response_Type int32
const (
	Response_QUERY      Response_Type = 1
	Response_WRITE_OK   Response_Type = 2
	Response_END_STREAM Response_Type = 3
)

func (Response_Type) Enum

func (x Response_Type) Enum() *Response_Type

func (Response_Type) String

func (x Response_Type) String() string

func (*Response_Type) UnmarshalJSON

func (x *Response_Type) UnmarshalJSON(data []byte) error

type Series

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 (*Series) GetFields

func (m *Series) GetFields() []string

func (*Series) GetName

func (m *Series) GetName() string

func (*Series) GetPoints

func (m *Series) GetPoints() []*Point

func (*Series) ProtoMessage

func (*Series) ProtoMessage()

func (*Series) Reset

func (m *Series) Reset()

func (*Series) String

func (m *Series) String() string

Jump to

Keyboard shortcuts

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