Documentation
¶
Index ¶
- Constants
- func CDCRecordSchema(tableFields []arrow.Field) *arrow.Schema
- func ValidateOp(op string) error
- type DoPutRequest
- type EnsureTableRequest
- type GetFlightInfoRequest
- type ListTablesResponse
- type PositionRequest
- type PositionResponse
- type Role
- type StatusResponse
- type TableInfo
- type TableStatus
Constants ¶
const ( OpInsert = "c" OpUpdate = "u" OpDelete = "d" )
Op values for the CDC change record.
const ProtocolVersion = 1
Variables ¶
This section is empty.
Functions ¶
func CDCRecordSchema ¶
CDCRecordSchema returns the fixed schema of a CDC change record (CONTRACT §8.1). Columns: op(0), before(1), after(2), offset(3), ts_source(4). tableFields defines the columns of the source table for before/after structs.
func ValidateOp ¶
ValidateOp checks that op is one of the three allowed values.
Types ¶
type DoPutRequest ¶
type EnsureTableRequest ¶ added in v0.5.0
type EnsureTableRequest struct {
Table string `json:"table"`
Schema core.Schema `json:"schema"`
PrimaryKey []string `json:"primaryKey,omitempty"`
PartitionBy []string `json:"partitionBy,omitempty"`
Mode string `json:"mode"` // "upsert" | "append"
}
EnsureTableRequest is the body of the "urutau.ensure_table" action: the table's canonical schema, primary key and write mode, so an external sink has the type shape and the dedup key instead of re-inferring them from stringified rows (issue #569).
type GetFlightInfoRequest ¶
type ListTablesResponse ¶
type ListTablesResponse struct {
Tables []TableInfo `json:"tables"`
}
type PositionRequest ¶ added in v0.5.0
type PositionRequest struct {
Table string `json:"table"`
}
PositionRequest is the body of the "urutau.position" action.
type PositionResponse ¶ added in v0.5.0
type PositionResponse struct {
Position string `json:"position"`
}
PositionResponse is that action's result: the table's committed position, or empty when it has never been written (issue #569).
type StatusResponse ¶
type StatusResponse struct {
State string `json:"state"`
Tables map[string]TableStatus `json:"tables,omitempty"`
UptimeSec int64 `json:"uptimeSec"`
}