Documentation
¶
Index ¶
- Variables
- type DeletedRow
- func (x *DeletedRow) ClearResult()
- func (x *DeletedRow) GetResult() *v21.QueryResult
- func (x *DeletedRow) HasResult() bool
- func (*DeletedRow) ProtoMessage()
- func (x *DeletedRow) ProtoReflect() protoreflect.Message
- func (x *DeletedRow) Reset()
- func (x *DeletedRow) SetResult(v *v21.QueryResult)
- func (x *DeletedRow) String() string
- type DeletedRow_builder
- type SyncRequest
- func (x *SyncRequest) ClearCursor()
- func (x *SyncRequest) GetCells() []string
- func (x *SyncRequest) GetColumns() []string
- func (x *SyncRequest) GetCursor() *TableCursor
- func (x *SyncRequest) GetIncludeDeletes() bool
- func (x *SyncRequest) GetIncludeInserts() bool
- func (x *SyncRequest) GetIncludeUpdates() bool
- func (x *SyncRequest) GetTableName() string
- func (x *SyncRequest) GetTabletType() TabletType
- func (x *SyncRequest) HasCursor() bool
- func (*SyncRequest) ProtoMessage()
- func (x *SyncRequest) ProtoReflect() protoreflect.Message
- func (x *SyncRequest) Reset()
- func (x *SyncRequest) SetCells(v []string)
- func (x *SyncRequest) SetColumns(v []string)
- func (x *SyncRequest) SetCursor(v *TableCursor)
- func (x *SyncRequest) SetIncludeDeletes(v bool)
- func (x *SyncRequest) SetIncludeInserts(v bool)
- func (x *SyncRequest) SetIncludeUpdates(v bool)
- func (x *SyncRequest) SetTableName(v string)
- func (x *SyncRequest) SetTabletType(v TabletType)
- func (x *SyncRequest) String() string
- type SyncRequest_builder
- type SyncResponse
- func (x *SyncResponse) ClearCursor()
- func (x *SyncResponse) ClearError()
- func (x *SyncResponse) GetCursor() *TableCursor
- func (x *SyncResponse) GetDeletes() []*DeletedRow
- func (x *SyncResponse) GetError() *v211.RPCError
- func (x *SyncResponse) GetResult() []*v21.QueryResult
- func (x *SyncResponse) GetUpdates() []*UpdatedRow
- func (x *SyncResponse) HasCursor() bool
- func (x *SyncResponse) HasError() bool
- func (*SyncResponse) ProtoMessage()
- func (x *SyncResponse) ProtoReflect() protoreflect.Message
- func (x *SyncResponse) Reset()
- func (x *SyncResponse) SetCursor(v *TableCursor)
- func (x *SyncResponse) SetDeletes(v []*DeletedRow)
- func (x *SyncResponse) SetError(v *v211.RPCError)
- func (x *SyncResponse) SetResult(v []*v21.QueryResult)
- func (x *SyncResponse) SetUpdates(v []*UpdatedRow)
- func (x *SyncResponse) String() string
- type SyncResponse_builder
- type TableCursor
- func (x *TableCursor) ClearLastKnownPk()
- func (x *TableCursor) GetKeyspace() string
- func (x *TableCursor) GetLastKnownPk() *v21.QueryResult
- func (x *TableCursor) GetPosition() string
- func (x *TableCursor) GetShard() string
- func (x *TableCursor) HasLastKnownPk() bool
- func (*TableCursor) ProtoMessage()
- func (x *TableCursor) ProtoReflect() protoreflect.Message
- func (x *TableCursor) Reset()
- func (x *TableCursor) SetKeyspace(v string)
- func (x *TableCursor) SetLastKnownPk(v *v21.QueryResult)
- func (x *TableCursor) SetPosition(v string)
- func (x *TableCursor) SetShard(v string)
- func (x *TableCursor) String() string
- type TableCursor_builder
- type TabletType
- type UpdatedRow
- func (x *UpdatedRow) ClearAfter()
- func (x *UpdatedRow) ClearBefore()
- func (x *UpdatedRow) GetAfter() *v21.QueryResult
- func (x *UpdatedRow) GetBefore() *v21.QueryResult
- func (x *UpdatedRow) HasAfter() bool
- func (x *UpdatedRow) HasBefore() bool
- func (*UpdatedRow) ProtoMessage()
- func (x *UpdatedRow) ProtoReflect() protoreflect.Message
- func (x *UpdatedRow) Reset()
- func (x *UpdatedRow) SetAfter(v *v21.QueryResult)
- func (x *UpdatedRow) SetBefore(v *v21.QueryResult)
- func (x *UpdatedRow) String() string
- type UpdatedRow_builder
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TabletType_name = map[int32]string{ 0: "replica", 1: "primary", 2: "batch", } TabletType_value = map[string]int32{ "replica": 0, "primary": 1, "batch": 2, } )
Enum value maps for TabletType.
View Source
var File_psdbconnect_v1alpha1_connect_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type DeletedRow ¶
type DeletedRow struct {
// This result will contain only the primary keys from the deleted row.
Result *v21.QueryResult `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
// contains filtered or unexported fields
}
DeletedRow denotes a row that is deleted from the table referenced in the SyncRequest
func (*DeletedRow) ClearResult ¶
func (x *DeletedRow) ClearResult()
func (*DeletedRow) GetResult ¶
func (x *DeletedRow) GetResult() *v21.QueryResult
func (*DeletedRow) HasResult ¶
func (x *DeletedRow) HasResult() bool
func (*DeletedRow) ProtoMessage ¶
func (*DeletedRow) ProtoMessage()
func (*DeletedRow) ProtoReflect ¶
func (x *DeletedRow) ProtoReflect() protoreflect.Message
func (*DeletedRow) Reset ¶
func (x *DeletedRow) Reset()
func (*DeletedRow) SetResult ¶
func (x *DeletedRow) SetResult(v *v21.QueryResult)
func (*DeletedRow) String ¶
func (x *DeletedRow) String() string
type DeletedRow_builder ¶
type DeletedRow_builder struct {
// This result will contain only the primary keys from the deleted row.
Result *v21.QueryResult
// contains filtered or unexported fields
}
func (DeletedRow_builder) Build ¶
func (b0 DeletedRow_builder) Build() *DeletedRow
type SyncRequest ¶
type SyncRequest struct {
// The table name to Sync
TableName string `protobuf:"bytes,1,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"`
// Any known state of the table from the last time a sync was run.
Cursor *TableCursor `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
// Tablet to stream data from
TabletType TabletType `` /* 129-byte string literal not displayed */
// If true, any new data inserted into the table in table_name will be sent in the Sync session.
IncludeInserts bool `protobuf:"varint,4,opt,name=include_inserts,json=includeInserts,proto3" json:"include_inserts,omitempty"`
// If true, any updates to data in the table in table_name will be sent in the Sync session.
IncludeUpdates bool `protobuf:"varint,5,opt,name=include_updates,json=includeUpdates,proto3" json:"include_updates,omitempty"`
// If true, any deletes to data in the table in table_name will be sent in the Sync session.
IncludeDeletes bool `protobuf:"varint,6,opt,name=include_deletes,json=includeDeletes,proto3" json:"include_deletes,omitempty"`
// A list of columns to include in the data from the table, an empty array means all columns.
// If a column is referenced here that isn't in the table's schema, the SyncRequest will fail.
Columns []string `protobuf:"bytes,7,rep,name=columns,proto3" json:"columns,omitempty"`
// if specified, these cells are used to pick source tablets from.
// defaults to the cell of the vtgate serving the VStream API.
Cells []string `protobuf:"bytes,8,rep,name=cells,proto3" json:"cells,omitempty"`
// contains filtered or unexported fields
}
SyncRequest sets up the Sync session for a specific table in a keyspace, shard.
func (*SyncRequest) ClearCursor ¶
func (x *SyncRequest) ClearCursor()
func (*SyncRequest) GetCells ¶
func (x *SyncRequest) GetCells() []string
func (*SyncRequest) GetColumns ¶
func (x *SyncRequest) GetColumns() []string
func (*SyncRequest) GetCursor ¶
func (x *SyncRequest) GetCursor() *TableCursor
func (*SyncRequest) GetIncludeDeletes ¶
func (x *SyncRequest) GetIncludeDeletes() bool
func (*SyncRequest) GetIncludeInserts ¶
func (x *SyncRequest) GetIncludeInserts() bool
func (*SyncRequest) GetIncludeUpdates ¶
func (x *SyncRequest) GetIncludeUpdates() bool
func (*SyncRequest) GetTableName ¶
func (x *SyncRequest) GetTableName() string
func (*SyncRequest) GetTabletType ¶
func (x *SyncRequest) GetTabletType() TabletType
func (*SyncRequest) HasCursor ¶
func (x *SyncRequest) HasCursor() bool
func (*SyncRequest) ProtoMessage ¶
func (*SyncRequest) ProtoMessage()
func (*SyncRequest) ProtoReflect ¶
func (x *SyncRequest) ProtoReflect() protoreflect.Message
func (*SyncRequest) Reset ¶
func (x *SyncRequest) Reset()
func (*SyncRequest) SetCells ¶
func (x *SyncRequest) SetCells(v []string)
func (*SyncRequest) SetColumns ¶
func (x *SyncRequest) SetColumns(v []string)
func (*SyncRequest) SetCursor ¶
func (x *SyncRequest) SetCursor(v *TableCursor)
func (*SyncRequest) SetIncludeDeletes ¶
func (x *SyncRequest) SetIncludeDeletes(v bool)
func (*SyncRequest) SetIncludeInserts ¶
func (x *SyncRequest) SetIncludeInserts(v bool)
func (*SyncRequest) SetIncludeUpdates ¶
func (x *SyncRequest) SetIncludeUpdates(v bool)
func (*SyncRequest) SetTableName ¶
func (x *SyncRequest) SetTableName(v string)
func (*SyncRequest) SetTabletType ¶
func (x *SyncRequest) SetTabletType(v TabletType)
func (*SyncRequest) String ¶
func (x *SyncRequest) String() string
type SyncRequest_builder ¶
type SyncRequest_builder struct {
// The table name to Sync
TableName string
// Any known state of the table from the last time a sync was run.
Cursor *TableCursor
// Tablet to stream data from
TabletType TabletType
// If true, any new data inserted into the table in table_name will be sent in the Sync session.
IncludeInserts bool
// If true, any updates to data in the table in table_name will be sent in the Sync session.
IncludeUpdates bool
// If true, any deletes to data in the table in table_name will be sent in the Sync session.
IncludeDeletes bool
// A list of columns to include in the data from the table, an empty array means all columns.
// If a column is referenced here that isn't in the table's schema, the SyncRequest will fail.
Columns []string
// if specified, these cells are used to pick source tablets from.
// defaults to the cell of the vtgate serving the VStream API.
Cells []string
// contains filtered or unexported fields
}
func (SyncRequest_builder) Build ¶
func (b0 SyncRequest_builder) Build() *SyncRequest
type SyncResponse ¶
type SyncResponse struct {
// An array of rows that denote inserts into the table.
Result []*v21.QueryResult `protobuf:"bytes,1,rep,name=result,proto3" json:"result,omitempty"`
// A state object to use that denotes the current state of the SyncResponse.
Cursor *TableCursor `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
// Any errors encountered in streaming data from the table.
Error *v211.RPCError `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
// An array of rows that denote deletes from the table.
Deletes []*DeletedRow `protobuf:"bytes,4,rep,name=deletes,proto3" json:"deletes,omitempty"`
// An array of rows that denote updates to the table.
Updates []*UpdatedRow `protobuf:"bytes,5,rep,name=updates,proto3" json:"updates,omitempty"`
// contains filtered or unexported fields
}
SyncResponse denotes a response to the SyncRequest
func (*SyncResponse) ClearCursor ¶
func (x *SyncResponse) ClearCursor()
func (*SyncResponse) ClearError ¶
func (x *SyncResponse) ClearError()
func (*SyncResponse) GetCursor ¶
func (x *SyncResponse) GetCursor() *TableCursor
func (*SyncResponse) GetDeletes ¶
func (x *SyncResponse) GetDeletes() []*DeletedRow
func (*SyncResponse) GetError ¶
func (x *SyncResponse) GetError() *v211.RPCError
func (*SyncResponse) GetResult ¶
func (x *SyncResponse) GetResult() []*v21.QueryResult
func (*SyncResponse) GetUpdates ¶
func (x *SyncResponse) GetUpdates() []*UpdatedRow
func (*SyncResponse) HasCursor ¶
func (x *SyncResponse) HasCursor() bool
func (*SyncResponse) HasError ¶
func (x *SyncResponse) HasError() bool
func (*SyncResponse) ProtoMessage ¶
func (*SyncResponse) ProtoMessage()
func (*SyncResponse) ProtoReflect ¶
func (x *SyncResponse) ProtoReflect() protoreflect.Message
func (*SyncResponse) Reset ¶
func (x *SyncResponse) Reset()
func (*SyncResponse) SetCursor ¶
func (x *SyncResponse) SetCursor(v *TableCursor)
func (*SyncResponse) SetDeletes ¶
func (x *SyncResponse) SetDeletes(v []*DeletedRow)
func (*SyncResponse) SetError ¶
func (x *SyncResponse) SetError(v *v211.RPCError)
func (*SyncResponse) SetResult ¶
func (x *SyncResponse) SetResult(v []*v21.QueryResult)
func (*SyncResponse) SetUpdates ¶
func (x *SyncResponse) SetUpdates(v []*UpdatedRow)
func (*SyncResponse) String ¶
func (x *SyncResponse) String() string
type SyncResponse_builder ¶
type SyncResponse_builder struct {
// An array of rows that denote inserts into the table.
Result []*v21.QueryResult
// A state object to use that denotes the current state of the SyncResponse.
Cursor *TableCursor
// Any errors encountered in streaming data from the table.
Error *v211.RPCError
// An array of rows that denote deletes from the table.
Deletes []*DeletedRow
// An array of rows that denote updates to the table.
Updates []*UpdatedRow
// contains filtered or unexported fields
}
func (SyncResponse_builder) Build ¶
func (b0 SyncResponse_builder) Build() *SyncResponse
type TableCursor ¶
type TableCursor struct {
// The shard to sync data from.
Shard string `protobuf:"bytes,1,opt,name=shard,proto3" json:"shard,omitempty"`
// Keyspace within a shard where the table resides.
Keyspace string `protobuf:"bytes,2,opt,name=keyspace,proto3" json:"keyspace,omitempty"`
// Any known vgtid positions from the last a previous session.
// If this value is empty, the Sync request is treated as a request to
// download all data within a table in a shard.
// If this value is invalid, i.e. incorrect format or the binlogs have been purged,
// the SyncRequest will fail.
Position string `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"`
// Any known last known primary key values from the a previous session.
LastKnownPk *v21.QueryResult `protobuf:"bytes,4,opt,name=last_known_pk,json=lastKnownPk,proto3" json:"last_known_pk,omitempty"`
// contains filtered or unexported fields
}
TableCursor denotes state of a Sync request to a table. This type can be round-tripped in a SyncRequest to pickup where the last Sync session left off.
func (*TableCursor) ClearLastKnownPk ¶
func (x *TableCursor) ClearLastKnownPk()
func (*TableCursor) GetKeyspace ¶
func (x *TableCursor) GetKeyspace() string
func (*TableCursor) GetLastKnownPk ¶
func (x *TableCursor) GetLastKnownPk() *v21.QueryResult
func (*TableCursor) GetPosition ¶
func (x *TableCursor) GetPosition() string
func (*TableCursor) GetShard ¶
func (x *TableCursor) GetShard() string
func (*TableCursor) HasLastKnownPk ¶
func (x *TableCursor) HasLastKnownPk() bool
func (*TableCursor) ProtoMessage ¶
func (*TableCursor) ProtoMessage()
func (*TableCursor) ProtoReflect ¶
func (x *TableCursor) ProtoReflect() protoreflect.Message
func (*TableCursor) Reset ¶
func (x *TableCursor) Reset()
func (*TableCursor) SetKeyspace ¶
func (x *TableCursor) SetKeyspace(v string)
func (*TableCursor) SetLastKnownPk ¶
func (x *TableCursor) SetLastKnownPk(v *v21.QueryResult)
func (*TableCursor) SetPosition ¶
func (x *TableCursor) SetPosition(v string)
func (*TableCursor) SetShard ¶
func (x *TableCursor) SetShard(v string)
func (*TableCursor) String ¶
func (x *TableCursor) String() string
type TableCursor_builder ¶
type TableCursor_builder struct {
// The shard to sync data from.
Shard string
// Keyspace within a shard where the table resides.
Keyspace string
// Any known vgtid positions from the last a previous session.
// If this value is empty, the Sync request is treated as a request to
// download all data within a table in a shard.
// If this value is invalid, i.e. incorrect format or the binlogs have been purged,
// the SyncRequest will fail.
Position string
// Any known last known primary key values from the a previous session.
LastKnownPk *v21.QueryResult
// contains filtered or unexported fields
}
func (TableCursor_builder) Build ¶
func (b0 TableCursor_builder) Build() *TableCursor
type TabletType ¶
type TabletType int32
const ( // REPLICA replicates from primary. It is used to serve live traffic. // A REPLICA can be promoted to PRIMARY. A demoted PRIMARY will go to REPLICA. TabletType_replica TabletType = 0 // PRIMARY is the primary server for the shard. Only PRIMARY allows DMLs. TabletType_primary TabletType = 1 // BATCH is used to serve traffic for // long-running jobs. It is a separate type from REPLICA so // long-running queries don't affect web-like traffic. TabletType_batch TabletType = 2 )
func (TabletType) Descriptor ¶
func (TabletType) Descriptor() protoreflect.EnumDescriptor
func (TabletType) Enum ¶
func (x TabletType) Enum() *TabletType
func (TabletType) Number ¶
func (x TabletType) Number() protoreflect.EnumNumber
func (TabletType) String ¶
func (x TabletType) String() string
func (TabletType) Type ¶
func (TabletType) Type() protoreflect.EnumType
type UpdatedRow ¶
type UpdatedRow struct {
// All values of the table before the update was made.
Before *v21.QueryResult `protobuf:"bytes,1,opt,name=before,proto3" json:"before,omitempty"`
// All values of the table after the update was made.
After *v21.QueryResult `protobuf:"bytes,2,opt,name=after,proto3" json:"after,omitempty"`
// contains filtered or unexported fields
}
Updated denotes a row that is updated in the table referenced in the SyncRequest
func (*UpdatedRow) ClearAfter ¶
func (x *UpdatedRow) ClearAfter()
func (*UpdatedRow) ClearBefore ¶
func (x *UpdatedRow) ClearBefore()
func (*UpdatedRow) GetAfter ¶
func (x *UpdatedRow) GetAfter() *v21.QueryResult
func (*UpdatedRow) GetBefore ¶
func (x *UpdatedRow) GetBefore() *v21.QueryResult
func (*UpdatedRow) HasAfter ¶
func (x *UpdatedRow) HasAfter() bool
func (*UpdatedRow) HasBefore ¶
func (x *UpdatedRow) HasBefore() bool
func (*UpdatedRow) ProtoMessage ¶
func (*UpdatedRow) ProtoMessage()
func (*UpdatedRow) ProtoReflect ¶
func (x *UpdatedRow) ProtoReflect() protoreflect.Message
func (*UpdatedRow) Reset ¶
func (x *UpdatedRow) Reset()
func (*UpdatedRow) SetAfter ¶
func (x *UpdatedRow) SetAfter(v *v21.QueryResult)
func (*UpdatedRow) SetBefore ¶
func (x *UpdatedRow) SetBefore(v *v21.QueryResult)
func (*UpdatedRow) String ¶
func (x *UpdatedRow) String() string
type UpdatedRow_builder ¶
type UpdatedRow_builder struct {
// All values of the table before the update was made.
Before *v21.QueryResult
// All values of the table after the update was made.
After *v21.QueryResult
// contains filtered or unexported fields
}
func (UpdatedRow_builder) Build ¶
func (b0 UpdatedRow_builder) Build() *UpdatedRow
Source Files
¶
- connect.pb.go
Click to show internal directories.
Click to hide internal directories.