Documentation
¶
Index ¶
- func GetResponse(ctx context.Context, sc *spanner.Client, query Query) (chan StreamResponse, chan error)
- func Subscribe(ctx context.Context, sc *spanner.Client, name string) (chan DataChangeResponse, chan error)
- type ChangeRecord
- type ChildPartionsResponse
- type ChildPartition
- type ColumnType
- type DataChangeResponse
- type HeatbeatResponse
- type Mod
- type ModType
- type Query
- type StreamResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetResponse ¶
Types ¶
type ChangeRecord ¶
type ChangeRecord struct {
DataChanges []*DataChangeResponse `spanner:"data_change_record"`
Heartbeats []*HeatbeatResponse `spanner:"heartbeat_record"`
ChildPartiions []*ChildPartionsResponse `spanner:"child_partitions_record"`
}
type ChildPartionsResponse ¶
type ChildPartionsResponse struct {
StartTimeStamp time.Time `spanner:"start_timestamp"`
RecordSequence string `spanner:"record_sequence"`
ChildPartions []*ChildPartition `spanner:"child_partitions"`
}
type ChildPartition ¶
type ColumnType ¶
type DataChangeResponse ¶
type DataChangeResponse struct {
CommitTimestamp time.Time `spanner:"commit_timestamp"`
RecordSequence string `spanner:"record_sequence"`
ServerTransactionID string `spanner:"server_transaction_id"`
IsLastRecordInTransactionInPartition bool `spanner:"is_last_record_in_transaction_in_partition"`
TableName string `spanner:"table_name"`
ValueCaptureType string `spanner:"value_capture_type"`
ColumnTypes []*ColumnType `spanner:"column_types"`
Mods []*Mod `spanner:"mods"`
ModType string `spanner:"mod_type"`
NumberOfRecordsInTransaction int64 `spanner:"number_of_records_in_transaction"`
NumberOfPartitionsInTransaction int64 `spanner:"number_of_partitions_in_transaction"`
TransactionTag string `spanner:"transaction_tag"`
IsSystemTransaction bool `spanner:"is_system_transaction"`
}
type HeatbeatResponse ¶
type ModType ¶
type ModType string
ModType possible values INSERT/UPDATE/DELETE
const ( // ModTypeInsert is raised when an insert occurs to subscribed tables ModTypeInsert ModType = "INSERT" // ModTypeUpdate is raised when an updated occurs on the subscribed table ModTypeUpdate ModType = "UPDATE" // ModTypeDelete is raised when a delete occurs on the subscribed table ModTypeDelete ModType = "DELETE" )
type StreamResponse ¶
type StreamResponse struct {
ChangeRecord []*ChangeRecord `spanner:"ChangeRecord"`
}
Click to show internal directories.
Click to hide internal directories.