contract

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpInsert = "c"
	OpUpdate = "u"
	OpDelete = "d"
)

Op values for the CDC change record.

View Source
const ProtocolVersion = 1

Variables

This section is empty.

Functions

func CDCRecordSchema

func CDCRecordSchema(tableFields []arrow.Field) *arrow.Schema

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

func ValidateOp(op string) error

ValidateOp checks that op is one of the three allowed values.

Types

type DoPutRequest

type DoPutRequest struct {
	Mode  string `json:"mode"`
	Table string `json:"table"`
}

type FlightInfoResponse

type FlightInfoResponse struct {
	EndOffset    string `json:"endOffset,omitempty"`
	EstimatedLag *int64 `json:"estimatedLag,omitempty"`
}

type GetFlightInfoRequest

type GetFlightInfoRequest struct {
	Table      string `json:"table"`
	Mode       string `json:"mode"`
	FromOffset string `json:"fromOffset,omitempty"`
}

type ListTablesResponse

type ListTablesResponse struct {
	Tables []TableInfo `json:"tables"`
}

type Role

type Role string
const (
	RoleSource Role = "source"
	RoleSink   Role = "sink"
)

type StatusResponse

type StatusResponse struct {
	State     string                 `json:"state"`
	Tables    map[string]TableStatus `json:"tables,omitempty"`
	UptimeSec int64                  `json:"uptimeSec"`
}

type TableInfo

type TableInfo struct {
	Name             string `json:"name"`
	SupportsSnapshot bool   `json:"supportsSnapshot"`
}

type TableStatus

type TableStatus struct {
	Offset    string `json:"offset,omitempty"`
	LagEvents *int64 `json:"lagEvents,omitempty"`
}

Jump to

Keyboard shortcuts

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