psdbconnectv1alpha1

package
v1.33.0-20240109164443... Latest Latest
Warning

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

Go to latest
Published: unknown License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

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 *v16.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) Descriptor deprecated

func (*DeletedRow) Descriptor() ([]byte, []int)

Deprecated: Use DeletedRow.ProtoReflect.Descriptor instead.

func (*DeletedRow) GetResult

func (x *DeletedRow) GetResult() *v16.QueryResult

func (*DeletedRow) ProtoMessage

func (*DeletedRow) ProtoMessage()

func (*DeletedRow) ProtoReflect

func (x *DeletedRow) ProtoReflect() protoreflect.Message

func (*DeletedRow) Reset

func (x *DeletedRow) Reset()

func (*DeletedRow) String

func (x *DeletedRow) String() string

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) Descriptor deprecated

func (*SyncRequest) Descriptor() ([]byte, []int)

Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead.

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) ProtoMessage

func (*SyncRequest) ProtoMessage()

func (*SyncRequest) ProtoReflect

func (x *SyncRequest) ProtoReflect() protoreflect.Message

func (*SyncRequest) Reset

func (x *SyncRequest) Reset()

func (*SyncRequest) String

func (x *SyncRequest) String() string

type SyncResponse

type SyncResponse struct {

	// An array of rows that denote inserts into the table.
	Result []*v16.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 *v161.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) Descriptor deprecated

func (*SyncResponse) Descriptor() ([]byte, []int)

Deprecated: Use SyncResponse.ProtoReflect.Descriptor instead.

func (*SyncResponse) GetCursor

func (x *SyncResponse) GetCursor() *TableCursor

func (*SyncResponse) GetDeletes

func (x *SyncResponse) GetDeletes() []*DeletedRow

func (*SyncResponse) GetError

func (x *SyncResponse) GetError() *v161.RPCError

func (*SyncResponse) GetResult

func (x *SyncResponse) GetResult() []*v16.QueryResult

func (*SyncResponse) GetUpdates

func (x *SyncResponse) GetUpdates() []*UpdatedRow

func (*SyncResponse) ProtoMessage

func (*SyncResponse) ProtoMessage()

func (*SyncResponse) ProtoReflect

func (x *SyncResponse) ProtoReflect() protoreflect.Message

func (*SyncResponse) Reset

func (x *SyncResponse) Reset()

func (*SyncResponse) String

func (x *SyncResponse) String() string

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 *v16.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) Descriptor deprecated

func (*TableCursor) Descriptor() ([]byte, []int)

Deprecated: Use TableCursor.ProtoReflect.Descriptor instead.

func (*TableCursor) GetKeyspace

func (x *TableCursor) GetKeyspace() string

func (*TableCursor) GetLastKnownPk

func (x *TableCursor) GetLastKnownPk() *v16.QueryResult

func (*TableCursor) GetPosition

func (x *TableCursor) GetPosition() string

func (*TableCursor) GetShard

func (x *TableCursor) GetShard() string

func (*TableCursor) ProtoMessage

func (*TableCursor) ProtoMessage()

func (*TableCursor) ProtoReflect

func (x *TableCursor) ProtoReflect() protoreflect.Message

func (*TableCursor) Reset

func (x *TableCursor) Reset()

func (*TableCursor) String

func (x *TableCursor) String() string

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) EnumDescriptor deprecated

func (TabletType) EnumDescriptor() ([]byte, []int)

Deprecated: Use TabletType.Descriptor instead.

func (TabletType) Number

func (x TabletType) Number() protoreflect.EnumNumber

func (TabletType) String

func (x TabletType) String() string

func (TabletType) Type

type UpdatedRow

type UpdatedRow struct {

	// All values of the table before the update was made.
	Before *v16.QueryResult `protobuf:"bytes,1,opt,name=before,proto3" json:"before,omitempty"`
	// All values of the table ater the update was made.
	After *v16.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) Descriptor deprecated

func (*UpdatedRow) Descriptor() ([]byte, []int)

Deprecated: Use UpdatedRow.ProtoReflect.Descriptor instead.

func (*UpdatedRow) GetAfter

func (x *UpdatedRow) GetAfter() *v16.QueryResult

func (*UpdatedRow) GetBefore

func (x *UpdatedRow) GetBefore() *v16.QueryResult

func (*UpdatedRow) ProtoMessage

func (*UpdatedRow) ProtoMessage()

func (*UpdatedRow) ProtoReflect

func (x *UpdatedRow) ProtoReflect() protoreflect.Message

func (*UpdatedRow) Reset

func (x *UpdatedRow) Reset()

func (*UpdatedRow) String

func (x *UpdatedRow) String() string

Jump to

Keyboard shortcuts

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