query

package
v2.0.0-alpha2+incompat... Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2015 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package query is a generated protocol buffer package.

It is generated from these files:

query.proto

It has these top-level messages:

Target
VTGateCallerID
BindVariable
BoundQuery
Field
Row
QueryResult
GetSessionIdRequest
GetSessionIdResponse
ExecuteRequest
ExecuteResponse
ExecuteBatchRequest
ExecuteBatchResponse
StreamExecuteRequest
StreamExecuteResponse
BeginRequest
BeginResponse
CommitRequest
CommitResponse
RollbackRequest
RollbackResponse
SplitQueryRequest
QuerySplit
SplitQueryResponse
StreamHealthRequest
RealtimeStats
StreamHealthResponse

Index

Constants

This section is empty.

Variables

View Source
var BindVariable_Type_name = map[int32]string{
	0: "TYPE_NULL",
	1: "TYPE_BYTES",
	2: "TYPE_INT",
	3: "TYPE_UINT",
	4: "TYPE_FLOAT",
	5: "TYPE_BYTES_LIST",
	6: "TYPE_INT_LIST",
	7: "TYPE_UINT_LIST",
	8: "TYPE_FLOAT_LIST",
}
View Source
var BindVariable_Type_value = map[string]int32{
	"TYPE_NULL":       0,
	"TYPE_BYTES":      1,
	"TYPE_INT":        2,
	"TYPE_UINT":       3,
	"TYPE_FLOAT":      4,
	"TYPE_BYTES_LIST": 5,
	"TYPE_INT_LIST":   6,
	"TYPE_UINT_LIST":  7,
	"TYPE_FLOAT_LIST": 8,
}
View Source
var Field_Flag_name = map[int32]string{
	0:     "VT_ZEROVALUE_FLAG",
	1:     "VT_NOT_NULL_FLAG",
	2:     "VT_PRI_KEY_FLAG",
	4:     "VT_UNIQUE_KEY_FLAG",
	8:     "VT_MULTIPLE_KEY_FLAG",
	16:    "VT_BLOB_FLAG",
	32:    "VT_UNSIGNED_FLAG",
	64:    "VT_ZEROFILL_FLAG",
	128:   "VT_BINARY_FLAG",
	256:   "VT_ENUM_FLAG",
	512:   "VT_AUTO_INCREMENT_FLAG",
	1024:  "VT_TIMESTAMP_FLAG",
	2048:  "VT_SET_FLAG",
	4096:  "VT_NO_DEFAULT_VALUE_FLAG",
	8192:  "VT_ON_UPDATE_NOW_FLAG",
	32768: "VT_NUM_FLAG",
}
View Source
var Field_Flag_value = map[string]int32{
	"VT_ZEROVALUE_FLAG":        0,
	"VT_NOT_NULL_FLAG":         1,
	"VT_PRI_KEY_FLAG":          2,
	"VT_UNIQUE_KEY_FLAG":       4,
	"VT_MULTIPLE_KEY_FLAG":     8,
	"VT_BLOB_FLAG":             16,
	"VT_UNSIGNED_FLAG":         32,
	"VT_ZEROFILL_FLAG":         64,
	"VT_BINARY_FLAG":           128,
	"VT_ENUM_FLAG":             256,
	"VT_AUTO_INCREMENT_FLAG":   512,
	"VT_TIMESTAMP_FLAG":        1024,
	"VT_SET_FLAG":              2048,
	"VT_NO_DEFAULT_VALUE_FLAG": 4096,
	"VT_ON_UPDATE_NOW_FLAG":    8192,
	"VT_NUM_FLAG":              32768,
}
View Source
var Field_Type_name = map[int32]string{
	0:   "TYPE_DECIMAL",
	1:   "TYPE_TINY",
	2:   "TYPE_SHORT",
	3:   "TYPE_LONG",
	4:   "TYPE_FLOAT",
	5:   "TYPE_DOUBLE",
	6:   "TYPE_NULL",
	7:   "TYPE_TIMESTAMP",
	8:   "TYPE_LONGLONG",
	9:   "TYPE_INT24",
	10:  "TYPE_DATE",
	11:  "TYPE_TIME",
	12:  "TYPE_DATETIME",
	13:  "TYPE_YEAR",
	14:  "TYPE_NEWDATE",
	15:  "TYPE_VARCHAR",
	16:  "TYPE_BIT",
	246: "TYPE_NEWDECIMAL",
	247: "TYPE_ENUM",
	248: "TYPE_SET",
	249: "TYPE_TINY_BLOB",
	250: "TYPE_MEDIUM_BLOB",
	251: "TYPE_LONG_BLOB",
	252: "TYPE_BLOB",
	253: "TYPE_VAR_STRING",
	254: "TYPE_STRING",
	255: "TYPE_GEOMETRY",
}
View Source
var Field_Type_value = map[string]int32{
	"TYPE_DECIMAL":     0,
	"TYPE_TINY":        1,
	"TYPE_SHORT":       2,
	"TYPE_LONG":        3,
	"TYPE_FLOAT":       4,
	"TYPE_DOUBLE":      5,
	"TYPE_NULL":        6,
	"TYPE_TIMESTAMP":   7,
	"TYPE_LONGLONG":    8,
	"TYPE_INT24":       9,
	"TYPE_DATE":        10,
	"TYPE_TIME":        11,
	"TYPE_DATETIME":    12,
	"TYPE_YEAR":        13,
	"TYPE_NEWDATE":     14,
	"TYPE_VARCHAR":     15,
	"TYPE_BIT":         16,
	"TYPE_NEWDECIMAL":  246,
	"TYPE_ENUM":        247,
	"TYPE_SET":         248,
	"TYPE_TINY_BLOB":   249,
	"TYPE_MEDIUM_BLOB": 250,
	"TYPE_LONG_BLOB":   251,
	"TYPE_BLOB":        252,
	"TYPE_VAR_STRING":  253,
	"TYPE_STRING":      254,
	"TYPE_GEOMETRY":    255,
}

Functions

This section is empty.

Types

type BeginRequest

type BeginRequest struct {
	EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id" json:"effective_caller_id,omitempty"`
	ImmediateCallerId *VTGateCallerID `protobuf:"bytes,2,opt,name=immediate_caller_id" json:"immediate_caller_id,omitempty"`
	Target            *Target         `protobuf:"bytes,3,opt,name=target" json:"target,omitempty"`
	SessionId         int64           `protobuf:"varint,4,opt,name=session_id" json:"session_id,omitempty"`
}

BeginRequest is the payload to Begin

func (*BeginRequest) GetEffectiveCallerId

func (m *BeginRequest) GetEffectiveCallerId() *vtrpc.CallerID

func (*BeginRequest) GetImmediateCallerId

func (m *BeginRequest) GetImmediateCallerId() *VTGateCallerID

func (*BeginRequest) GetTarget

func (m *BeginRequest) GetTarget() *Target

func (*BeginRequest) ProtoMessage

func (*BeginRequest) ProtoMessage()

func (*BeginRequest) Reset

func (m *BeginRequest) Reset()

func (*BeginRequest) String

func (m *BeginRequest) String() string

type BeginResponse

type BeginResponse struct {
	TransactionId int64 `protobuf:"varint,1,opt,name=transaction_id" json:"transaction_id,omitempty"`
}

BeginResponse is the returned value from Begin

func (*BeginResponse) ProtoMessage

func (*BeginResponse) ProtoMessage()

func (*BeginResponse) Reset

func (m *BeginResponse) Reset()

func (*BeginResponse) String

func (m *BeginResponse) String() string

type BindVariable

type BindVariable struct {
	Type BindVariable_Type `protobuf:"varint,1,opt,name=type,enum=query.BindVariable_Type" json:"type,omitempty"`
	// Depending on type, only one value below is set.
	ValueBytes     []byte    `protobuf:"bytes,2,opt,name=value_bytes,proto3" json:"value_bytes,omitempty"`
	ValueInt       int64     `protobuf:"varint,3,opt,name=value_int" json:"value_int,omitempty"`
	ValueUint      uint64    `protobuf:"varint,4,opt,name=value_uint" json:"value_uint,omitempty"`
	ValueFloat     float64   `protobuf:"fixed64,5,opt,name=value_float" json:"value_float,omitempty"`
	ValueBytesList [][]byte  `protobuf:"bytes,6,rep,name=value_bytes_list,proto3" json:"value_bytes_list,omitempty"`
	ValueIntList   []int64   `protobuf:"varint,7,rep,name=value_int_list" json:"value_int_list,omitempty"`
	ValueUintList  []uint64  `protobuf:"varint,8,rep,name=value_uint_list" json:"value_uint_list,omitempty"`
	ValueFloatList []float64 `protobuf:"fixed64,9,rep,name=value_float_list" json:"value_float_list,omitempty"`
}

BindVariable represents a single bind variable in a Query

func (*BindVariable) ProtoMessage

func (*BindVariable) ProtoMessage()

func (*BindVariable) Reset

func (m *BindVariable) Reset()

func (*BindVariable) String

func (m *BindVariable) String() string

type BindVariable_Type

type BindVariable_Type int32
const (
	BindVariable_TYPE_NULL       BindVariable_Type = 0
	BindVariable_TYPE_BYTES      BindVariable_Type = 1
	BindVariable_TYPE_INT        BindVariable_Type = 2
	BindVariable_TYPE_UINT       BindVariable_Type = 3
	BindVariable_TYPE_FLOAT      BindVariable_Type = 4
	BindVariable_TYPE_BYTES_LIST BindVariable_Type = 5
	BindVariable_TYPE_INT_LIST   BindVariable_Type = 6
	BindVariable_TYPE_UINT_LIST  BindVariable_Type = 7
	BindVariable_TYPE_FLOAT_LIST BindVariable_Type = 8
)

func (BindVariable_Type) String

func (x BindVariable_Type) String() string

type BoundQuery

type BoundQuery struct {
	Sql           []byte                   `protobuf:"bytes,1,opt,name=sql,proto3" json:"sql,omitempty"`
	BindVariables map[string]*BindVariable `` /* 148-byte string literal not displayed */
}

BoundQuery is a query with its bind variables

func (*BoundQuery) GetBindVariables

func (m *BoundQuery) GetBindVariables() map[string]*BindVariable

func (*BoundQuery) ProtoMessage

func (*BoundQuery) ProtoMessage()

func (*BoundQuery) Reset

func (m *BoundQuery) Reset()

func (*BoundQuery) String

func (m *BoundQuery) String() string

type CommitRequest

type CommitRequest struct {
	EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id" json:"effective_caller_id,omitempty"`
	ImmediateCallerId *VTGateCallerID `protobuf:"bytes,2,opt,name=immediate_caller_id" json:"immediate_caller_id,omitempty"`
	Target            *Target         `protobuf:"bytes,3,opt,name=target" json:"target,omitempty"`
	TransactionId     int64           `protobuf:"varint,4,opt,name=transaction_id" json:"transaction_id,omitempty"`
	SessionId         int64           `protobuf:"varint,5,opt,name=session_id" json:"session_id,omitempty"`
}

CommitRequest is the payload to Commit

func (*CommitRequest) GetEffectiveCallerId

func (m *CommitRequest) GetEffectiveCallerId() *vtrpc.CallerID

func (*CommitRequest) GetImmediateCallerId

func (m *CommitRequest) GetImmediateCallerId() *VTGateCallerID

func (*CommitRequest) GetTarget

func (m *CommitRequest) GetTarget() *Target

func (*CommitRequest) ProtoMessage

func (*CommitRequest) ProtoMessage()

func (*CommitRequest) Reset

func (m *CommitRequest) Reset()

func (*CommitRequest) String

func (m *CommitRequest) String() string

type CommitResponse

type CommitResponse struct {
}

CommitResponse is the returned value from Commit

func (*CommitResponse) ProtoMessage

func (*CommitResponse) ProtoMessage()

func (*CommitResponse) Reset

func (m *CommitResponse) Reset()

func (*CommitResponse) String

func (m *CommitResponse) String() string

type ExecuteBatchRequest

type ExecuteBatchRequest struct {
	EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id" json:"effective_caller_id,omitempty"`
	ImmediateCallerId *VTGateCallerID `protobuf:"bytes,2,opt,name=immediate_caller_id" json:"immediate_caller_id,omitempty"`
	Target            *Target         `protobuf:"bytes,3,opt,name=target" json:"target,omitempty"`
	Queries           []*BoundQuery   `protobuf:"bytes,4,rep,name=queries" json:"queries,omitempty"`
	AsTransaction     bool            `protobuf:"varint,5,opt,name=as_transaction" json:"as_transaction,omitempty"`
	TransactionId     int64           `protobuf:"varint,6,opt,name=transaction_id" json:"transaction_id,omitempty"`
	SessionId         int64           `protobuf:"varint,7,opt,name=session_id" json:"session_id,omitempty"`
}

ExecuteBatchRequest is the payload to ExecuteBatch

func (*ExecuteBatchRequest) GetEffectiveCallerId

func (m *ExecuteBatchRequest) GetEffectiveCallerId() *vtrpc.CallerID

func (*ExecuteBatchRequest) GetImmediateCallerId

func (m *ExecuteBatchRequest) GetImmediateCallerId() *VTGateCallerID

func (*ExecuteBatchRequest) GetQueries

func (m *ExecuteBatchRequest) GetQueries() []*BoundQuery

func (*ExecuteBatchRequest) GetTarget

func (m *ExecuteBatchRequest) GetTarget() *Target

func (*ExecuteBatchRequest) ProtoMessage

func (*ExecuteBatchRequest) ProtoMessage()

func (*ExecuteBatchRequest) Reset

func (m *ExecuteBatchRequest) Reset()

func (*ExecuteBatchRequest) String

func (m *ExecuteBatchRequest) String() string

type ExecuteBatchResponse

type ExecuteBatchResponse struct {
	Results []*QueryResult `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"`
}

ExecuteBatchResponse is the returned value from ExecuteBatch

func (*ExecuteBatchResponse) GetResults

func (m *ExecuteBatchResponse) GetResults() []*QueryResult

func (*ExecuteBatchResponse) ProtoMessage

func (*ExecuteBatchResponse) ProtoMessage()

func (*ExecuteBatchResponse) Reset

func (m *ExecuteBatchResponse) Reset()

func (*ExecuteBatchResponse) String

func (m *ExecuteBatchResponse) String() string

type ExecuteRequest

type ExecuteRequest struct {
	EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id" json:"effective_caller_id,omitempty"`
	ImmediateCallerId *VTGateCallerID `protobuf:"bytes,2,opt,name=immediate_caller_id" json:"immediate_caller_id,omitempty"`
	Target            *Target         `protobuf:"bytes,3,opt,name=target" json:"target,omitempty"`
	Query             *BoundQuery     `protobuf:"bytes,4,opt,name=query" json:"query,omitempty"`
	TransactionId     int64           `protobuf:"varint,5,opt,name=transaction_id" json:"transaction_id,omitempty"`
	SessionId         int64           `protobuf:"varint,6,opt,name=session_id" json:"session_id,omitempty"`
}

ExecuteRequest is the payload to Execute

func (*ExecuteRequest) GetEffectiveCallerId

func (m *ExecuteRequest) GetEffectiveCallerId() *vtrpc.CallerID

func (*ExecuteRequest) GetImmediateCallerId

func (m *ExecuteRequest) GetImmediateCallerId() *VTGateCallerID

func (*ExecuteRequest) GetQuery

func (m *ExecuteRequest) GetQuery() *BoundQuery

func (*ExecuteRequest) GetTarget

func (m *ExecuteRequest) GetTarget() *Target

func (*ExecuteRequest) ProtoMessage

func (*ExecuteRequest) ProtoMessage()

func (*ExecuteRequest) Reset

func (m *ExecuteRequest) Reset()

func (*ExecuteRequest) String

func (m *ExecuteRequest) String() string

type ExecuteResponse

type ExecuteResponse struct {
	Result *QueryResult `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"`
}

ExecuteResponse is the returned value from Execute

func (*ExecuteResponse) GetResult

func (m *ExecuteResponse) GetResult() *QueryResult

func (*ExecuteResponse) ProtoMessage

func (*ExecuteResponse) ProtoMessage()

func (*ExecuteResponse) Reset

func (m *ExecuteResponse) Reset()

func (*ExecuteResponse) String

func (m *ExecuteResponse) String() string

type Field

type Field struct {
	// name of the field as returned by mysql C API
	Name string     `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Type Field_Type `protobuf:"varint,2,opt,name=type,enum=query.Field_Type" json:"type,omitempty"`
	// flags is essentially a bitset<Flag>.
	Flags int64 `protobuf:"varint,3,opt,name=flags" json:"flags,omitempty"`
}

Field describes a single column returned by a query

func (*Field) ProtoMessage

func (*Field) ProtoMessage()

func (*Field) Reset

func (m *Field) Reset()

func (*Field) String

func (m *Field) String() string

type Field_Flag

type Field_Flag int32

Flag contains the MySQL field flags bitset values e.g. to distinguish between signed and unsigned integer. These numbers should exactly match values defined in dist/mysql-5.1.52/include/mysql_com.h

const (
	// ZEROVALUE_FLAG is not part of the MySQL specification and only
	// used in unit tests.
	Field_VT_ZEROVALUE_FLAG        Field_Flag = 0
	Field_VT_NOT_NULL_FLAG         Field_Flag = 1
	Field_VT_PRI_KEY_FLAG          Field_Flag = 2
	Field_VT_UNIQUE_KEY_FLAG       Field_Flag = 4
	Field_VT_MULTIPLE_KEY_FLAG     Field_Flag = 8
	Field_VT_BLOB_FLAG             Field_Flag = 16
	Field_VT_UNSIGNED_FLAG         Field_Flag = 32
	Field_VT_ZEROFILL_FLAG         Field_Flag = 64
	Field_VT_BINARY_FLAG           Field_Flag = 128
	Field_VT_ENUM_FLAG             Field_Flag = 256
	Field_VT_AUTO_INCREMENT_FLAG   Field_Flag = 512
	Field_VT_TIMESTAMP_FLAG        Field_Flag = 1024
	Field_VT_SET_FLAG              Field_Flag = 2048
	Field_VT_NO_DEFAULT_VALUE_FLAG Field_Flag = 4096
	Field_VT_ON_UPDATE_NOW_FLAG    Field_Flag = 8192
	Field_VT_NUM_FLAG              Field_Flag = 32768
)

func (Field_Flag) String

func (x Field_Flag) String() string

type Field_Type

type Field_Type int32

Type follows enum_field_types from mysql.h.

const (
	Field_TYPE_DECIMAL     Field_Type = 0
	Field_TYPE_TINY        Field_Type = 1
	Field_TYPE_SHORT       Field_Type = 2
	Field_TYPE_LONG        Field_Type = 3
	Field_TYPE_FLOAT       Field_Type = 4
	Field_TYPE_DOUBLE      Field_Type = 5
	Field_TYPE_NULL        Field_Type = 6
	Field_TYPE_TIMESTAMP   Field_Type = 7
	Field_TYPE_LONGLONG    Field_Type = 8
	Field_TYPE_INT24       Field_Type = 9
	Field_TYPE_DATE        Field_Type = 10
	Field_TYPE_TIME        Field_Type = 11
	Field_TYPE_DATETIME    Field_Type = 12
	Field_TYPE_YEAR        Field_Type = 13
	Field_TYPE_NEWDATE     Field_Type = 14
	Field_TYPE_VARCHAR     Field_Type = 15
	Field_TYPE_BIT         Field_Type = 16
	Field_TYPE_NEWDECIMAL  Field_Type = 246
	Field_TYPE_ENUM        Field_Type = 247
	Field_TYPE_SET         Field_Type = 248
	Field_TYPE_TINY_BLOB   Field_Type = 249
	Field_TYPE_MEDIUM_BLOB Field_Type = 250
	Field_TYPE_LONG_BLOB   Field_Type = 251
	Field_TYPE_BLOB        Field_Type = 252
	Field_TYPE_VAR_STRING  Field_Type = 253
	Field_TYPE_STRING      Field_Type = 254
	Field_TYPE_GEOMETRY    Field_Type = 255
)

func (Field_Type) String

func (x Field_Type) String() string

type GetSessionIdRequest

type GetSessionIdRequest struct {
	EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id" json:"effective_caller_id,omitempty"`
	ImmediateCallerId *VTGateCallerID `protobuf:"bytes,2,opt,name=immediate_caller_id" json:"immediate_caller_id,omitempty"`
	Keyspace          string          `protobuf:"bytes,3,opt,name=keyspace" json:"keyspace,omitempty"`
	Shard             string          `protobuf:"bytes,4,opt,name=shard" json:"shard,omitempty"`
}

GetSessionIdRequest is the payload to GetSessionId

func (*GetSessionIdRequest) GetEffectiveCallerId

func (m *GetSessionIdRequest) GetEffectiveCallerId() *vtrpc.CallerID

func (*GetSessionIdRequest) GetImmediateCallerId

func (m *GetSessionIdRequest) GetImmediateCallerId() *VTGateCallerID

func (*GetSessionIdRequest) ProtoMessage

func (*GetSessionIdRequest) ProtoMessage()

func (*GetSessionIdRequest) Reset

func (m *GetSessionIdRequest) Reset()

func (*GetSessionIdRequest) String

func (m *GetSessionIdRequest) String() string

type GetSessionIdResponse

type GetSessionIdResponse struct {
	SessionId int64 `protobuf:"varint,1,opt,name=session_id" json:"session_id,omitempty"`
}

GetSessionIdResponse is the returned value from GetSessionId

func (*GetSessionIdResponse) ProtoMessage

func (*GetSessionIdResponse) ProtoMessage()

func (*GetSessionIdResponse) Reset

func (m *GetSessionIdResponse) Reset()

func (*GetSessionIdResponse) String

func (m *GetSessionIdResponse) String() string

type QueryResult

type QueryResult struct {
	Fields       []*Field `protobuf:"bytes,1,rep,name=fields" json:"fields,omitempty"`
	RowsAffected uint64   `protobuf:"varint,2,opt,name=rows_affected" json:"rows_affected,omitempty"`
	InsertId     uint64   `protobuf:"varint,3,opt,name=insert_id" json:"insert_id,omitempty"`
	Rows         []*Row   `protobuf:"bytes,4,rep,name=rows" json:"rows,omitempty"`
}

QueryResult is returned by Execute and ExecuteStream.

As returned by Execute, len(fields) is always equal to len(row) (for each row in rows).

As returned by StreamExecute, the first QueryResult has the fields set, and subsequent QueryResult have rows set. And as Execute, len(QueryResult[0].fields) is always equal to len(row) (for each row in rows for each QueryResult in QueryResult[1:]).

func (*QueryResult) GetFields

func (m *QueryResult) GetFields() []*Field

func (*QueryResult) GetRows

func (m *QueryResult) GetRows() []*Row

func (*QueryResult) ProtoMessage

func (*QueryResult) ProtoMessage()

func (*QueryResult) Reset

func (m *QueryResult) Reset()

func (*QueryResult) String

func (m *QueryResult) String() string

type QuerySplit

type QuerySplit struct {
	// query is the query to execute
	Query *BoundQuery `protobuf:"bytes,1,opt,name=query" json:"query,omitempty"`
	// row_count is the approximate row count the query will return
	RowCount int64 `protobuf:"varint,2,opt,name=row_count" json:"row_count,omitempty"`
}

QuerySplit represents one query to execute on the tablet

func (*QuerySplit) GetQuery

func (m *QuerySplit) GetQuery() *BoundQuery

func (*QuerySplit) ProtoMessage

func (*QuerySplit) ProtoMessage()

func (*QuerySplit) Reset

func (m *QuerySplit) Reset()

func (*QuerySplit) String

func (m *QuerySplit) String() string

type RealtimeStats

type RealtimeStats struct {
	// health_error is the last error we got from health check,
	// or empty is the server is healthy. This is used for subset selection,
	// we do not send queries to servers that are not healthy.
	HealthError string `protobuf:"bytes,1,opt,name=health_error" json:"health_error,omitempty"`
	// seconds_behind_master is populated for slaves only. It indicates
	// how far behind on (MySQL) replication a slave currently is.  It is used
	// by clients for subset selection (so we don't try to send traffic
	// to tablets that are too far behind).
	// NOTE: This field must not be evaluated if "health_error" is not empty.
	// TODO(mberlin): Let's switch it to int64 instead?
	SecondsBehindMaster uint32 `protobuf:"varint,2,opt,name=seconds_behind_master" json:"seconds_behind_master,omitempty"`
	// bin_log_players_count is the number of currently running binlog players.
	// if the value is 0, it means that filtered replication is currently not
	// running on the tablet. If >0, filtered replication is running.
	// NOTE: This field must not be evaluated if "health_error" is not empty.
	BinlogPlayersCount int32 `protobuf:"varint,3,opt,name=binlog_players_count" json:"binlog_players_count,omitempty"`
	// seconds_behind_master_filtered_replication is populated for the receiving
	// master of an ongoing filtered replication only.
	// It specifies how far the receiving master lags behind the sending master.
	// NOTE: This field must not be evaluated if "health_error" is not empty.
	// NOTE: This field must not be evaluated if "bin_log_players_count" is 0.
	SecondsBehindMasterFilteredReplication int64 `` /* 131-byte string literal not displayed */
	// cpu_usage is used for load-based balancing
	CpuUsage float64 `protobuf:"fixed64,5,opt,name=cpu_usage" json:"cpu_usage,omitempty"`
}

RealtimeStats contains information about the tablet status

func (*RealtimeStats) ProtoMessage

func (*RealtimeStats) ProtoMessage()

func (*RealtimeStats) Reset

func (m *RealtimeStats) Reset()

func (*RealtimeStats) String

func (m *RealtimeStats) String() string

type RollbackRequest

type RollbackRequest struct {
	EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id" json:"effective_caller_id,omitempty"`
	ImmediateCallerId *VTGateCallerID `protobuf:"bytes,2,opt,name=immediate_caller_id" json:"immediate_caller_id,omitempty"`
	Target            *Target         `protobuf:"bytes,3,opt,name=target" json:"target,omitempty"`
	TransactionId     int64           `protobuf:"varint,4,opt,name=transaction_id" json:"transaction_id,omitempty"`
	SessionId         int64           `protobuf:"varint,5,opt,name=session_id" json:"session_id,omitempty"`
}

RollbackRequest is the payload to Rollback

func (*RollbackRequest) GetEffectiveCallerId

func (m *RollbackRequest) GetEffectiveCallerId() *vtrpc.CallerID

func (*RollbackRequest) GetImmediateCallerId

func (m *RollbackRequest) GetImmediateCallerId() *VTGateCallerID

func (*RollbackRequest) GetTarget

func (m *RollbackRequest) GetTarget() *Target

func (*RollbackRequest) ProtoMessage

func (*RollbackRequest) ProtoMessage()

func (*RollbackRequest) Reset

func (m *RollbackRequest) Reset()

func (*RollbackRequest) String

func (m *RollbackRequest) String() string

type RollbackResponse

type RollbackResponse struct {
}

RollbackResponse is the returned value from Rollback

func (*RollbackResponse) ProtoMessage

func (*RollbackResponse) ProtoMessage()

func (*RollbackResponse) Reset

func (m *RollbackResponse) Reset()

func (*RollbackResponse) String

func (m *RollbackResponse) String() string

type Row

type Row struct {
	Values [][]byte `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
}

Row is a database row.

func (*Row) ProtoMessage

func (*Row) ProtoMessage()

func (*Row) Reset

func (m *Row) Reset()

func (*Row) String

func (m *Row) String() string

type SplitQueryRequest

type SplitQueryRequest struct {
	EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id" json:"effective_caller_id,omitempty"`
	ImmediateCallerId *VTGateCallerID `protobuf:"bytes,2,opt,name=immediate_caller_id" json:"immediate_caller_id,omitempty"`
	Target            *Target         `protobuf:"bytes,3,opt,name=target" json:"target,omitempty"`
	Query             *BoundQuery     `protobuf:"bytes,4,opt,name=query" json:"query,omitempty"`
	SplitColumn       string          `protobuf:"bytes,5,opt,name=split_column" json:"split_column,omitempty"`
	SplitCount        int64           `protobuf:"varint,6,opt,name=split_count" json:"split_count,omitempty"`
	SessionId         int64           `protobuf:"varint,7,opt,name=session_id" json:"session_id,omitempty"`
}

SplitQueryRequest is the payload for SplitQuery

func (*SplitQueryRequest) GetEffectiveCallerId

func (m *SplitQueryRequest) GetEffectiveCallerId() *vtrpc.CallerID

func (*SplitQueryRequest) GetImmediateCallerId

func (m *SplitQueryRequest) GetImmediateCallerId() *VTGateCallerID

func (*SplitQueryRequest) GetQuery

func (m *SplitQueryRequest) GetQuery() *BoundQuery

func (*SplitQueryRequest) GetTarget

func (m *SplitQueryRequest) GetTarget() *Target

func (*SplitQueryRequest) ProtoMessage

func (*SplitQueryRequest) ProtoMessage()

func (*SplitQueryRequest) Reset

func (m *SplitQueryRequest) Reset()

func (*SplitQueryRequest) String

func (m *SplitQueryRequest) String() string

type SplitQueryResponse

type SplitQueryResponse struct {
	Queries []*QuerySplit `protobuf:"bytes,1,rep,name=queries" json:"queries,omitempty"`
}

SplitQueryResponse is returned by SplitQuery and represents all the queries to execute in order to get the entire data set.

func (*SplitQueryResponse) GetQueries

func (m *SplitQueryResponse) GetQueries() []*QuerySplit

func (*SplitQueryResponse) ProtoMessage

func (*SplitQueryResponse) ProtoMessage()

func (*SplitQueryResponse) Reset

func (m *SplitQueryResponse) Reset()

func (*SplitQueryResponse) String

func (m *SplitQueryResponse) String() string

type StreamExecuteRequest

type StreamExecuteRequest struct {
	EffectiveCallerId *vtrpc.CallerID `protobuf:"bytes,1,opt,name=effective_caller_id" json:"effective_caller_id,omitempty"`
	ImmediateCallerId *VTGateCallerID `protobuf:"bytes,2,opt,name=immediate_caller_id" json:"immediate_caller_id,omitempty"`
	Target            *Target         `protobuf:"bytes,3,opt,name=target" json:"target,omitempty"`
	Query             *BoundQuery     `protobuf:"bytes,4,opt,name=query" json:"query,omitempty"`
	SessionId         int64           `protobuf:"varint,5,opt,name=session_id" json:"session_id,omitempty"`
}

StreamExecuteRequest is the payload to StreamExecute

func (*StreamExecuteRequest) GetEffectiveCallerId

func (m *StreamExecuteRequest) GetEffectiveCallerId() *vtrpc.CallerID

func (*StreamExecuteRequest) GetImmediateCallerId

func (m *StreamExecuteRequest) GetImmediateCallerId() *VTGateCallerID

func (*StreamExecuteRequest) GetQuery

func (m *StreamExecuteRequest) GetQuery() *BoundQuery

func (*StreamExecuteRequest) GetTarget

func (m *StreamExecuteRequest) GetTarget() *Target

func (*StreamExecuteRequest) ProtoMessage

func (*StreamExecuteRequest) ProtoMessage()

func (*StreamExecuteRequest) Reset

func (m *StreamExecuteRequest) Reset()

func (*StreamExecuteRequest) String

func (m *StreamExecuteRequest) String() string

type StreamExecuteResponse

type StreamExecuteResponse struct {
	Result *QueryResult `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"`
}

StreamExecuteResponse is the returned value from StreamExecute

func (*StreamExecuteResponse) GetResult

func (m *StreamExecuteResponse) GetResult() *QueryResult

func (*StreamExecuteResponse) ProtoMessage

func (*StreamExecuteResponse) ProtoMessage()

func (*StreamExecuteResponse) Reset

func (m *StreamExecuteResponse) Reset()

func (*StreamExecuteResponse) String

func (m *StreamExecuteResponse) String() string

type StreamHealthRequest

type StreamHealthRequest struct {
}

StreamHealthRequest is the payload for StreamHealth

func (*StreamHealthRequest) ProtoMessage

func (*StreamHealthRequest) ProtoMessage()

func (*StreamHealthRequest) Reset

func (m *StreamHealthRequest) Reset()

func (*StreamHealthRequest) String

func (m *StreamHealthRequest) String() string

type StreamHealthResponse

type StreamHealthResponse struct {
	// target is the current server type. Only queries with that exact Target
	// record will be accepted.
	Target *Target `protobuf:"bytes,1,opt,name=target" json:"target,omitempty"`
	// tablet_externally_reparented_timestamp contains the last time
	// tabletmanager.TabletExternallyReparented was called on this tablet,
	// or 0 if it was never called. This is meant to differentiate two tablets
	// that report a target.TabletType of MASTER, only the one with the latest
	// timestamp should be trusted.
	TabletExternallyReparentedTimestamp int64 `protobuf:"varint,2,opt,name=tablet_externally_reparented_timestamp" json:"tablet_externally_reparented_timestamp,omitempty"`
	// realtime_stats contains information about the tablet status
	RealtimeStats *RealtimeStats `protobuf:"bytes,3,opt,name=realtime_stats" json:"realtime_stats,omitempty"`
}

StreamHealthResponse is streamed by StreamHealth on a regular basis

func (*StreamHealthResponse) GetRealtimeStats

func (m *StreamHealthResponse) GetRealtimeStats() *RealtimeStats

func (*StreamHealthResponse) GetTarget

func (m *StreamHealthResponse) GetTarget() *Target

func (*StreamHealthResponse) ProtoMessage

func (*StreamHealthResponse) ProtoMessage()

func (*StreamHealthResponse) Reset

func (m *StreamHealthResponse) Reset()

func (*StreamHealthResponse) String

func (m *StreamHealthResponse) String() string

type Target

type Target struct {
	Keyspace   string              `protobuf:"bytes,1,opt,name=keyspace" json:"keyspace,omitempty"`
	Shard      string              `protobuf:"bytes,2,opt,name=shard" json:"shard,omitempty"`
	TabletType topodata.TabletType `protobuf:"varint,3,opt,name=tablet_type,enum=topodata.TabletType" json:"tablet_type,omitempty"`
}

Target describes what the client expects the tablet is. If the tablet does not match, an error is returned.

func (*Target) ProtoMessage

func (*Target) ProtoMessage()

func (*Target) Reset

func (m *Target) Reset()

func (*Target) String

func (m *Target) String() string

type VTGateCallerID

type VTGateCallerID struct {
	Username string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"`
}

VTGateCallerID is sent by VTGate to VTTablet to describe the caller. If possible, this information is secure. For instance, if using unique certificates that guarantee that VTGate->VTTablet traffic cannot be spoofed, then VTTablet can trust this information, and VTTablet will use it for tablet ACLs, for instance. Because of this security guarantee, this is different than the CallerID structure, which is not secure at all, because it is provided by the Vitess client.

func (*VTGateCallerID) ProtoMessage

func (*VTGateCallerID) ProtoMessage()

func (*VTGateCallerID) Reset

func (m *VTGateCallerID) Reset()

func (*VTGateCallerID) String

func (m *VTGateCallerID) String() string

Jump to

Keyboard shortcuts

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