contract

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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