changefeedpb

package module
v0.0.0-...-bb6323f Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

README

changefeedpb

This repo provides the Protobuf definitions used to encode changefeed messages for CockroachDB’s CDC system. It also provides a Go package that can be used to marshal and unmarshal the messages, generated via gogoproto. Using the latter is optional.

Usage

Copy changefeed.proto into your project and use it like any other Protobuf file.

Development

If any changes are made to changefeed.proto, it needs to be regenerated using the protoc compiler with the gogoroach plugin. To do this follow the steps:

  1. First make sure you have the protoc-gen-gogoroach plugin installed and available in your PATH.
  2. Then run the following command from the root of the repository:
ERR_DIR=$(go list -m -f '{{.Dir}}' github.com/cockroachdb/errors)/errorspb GOGO_TYPES=$(go list -m -f '{{.Dir}}' github.com/gogo/protobuf)/typesGOGO_DESC=$(go list -m -f '{{.Dir}}' github.com/gogo/protobuf)/protoc-gen-gogo/descriptor

protoc -I . \
  -I "$ERR_DIR" \
  -I "$GOGO_TYPES" \
  -I "$GOGO_DESC" \
  --plugin=protoc-gen-gogoroach=$(which protoc-gen-gogoroach) \
  --gogoroach_out=paths=source_relative,plugins=grpc,\
-Merrorspb/errors.proto=github.com/cockroachdb/errors/errorspb,\
-Mgoogle/api/annotations.proto=google.golang.org/genproto/googleapis/api/annotations,\
-Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\
-Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\
-Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor,\
-Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types:. \
  changefeed.proto

Documentation

Overview

Copyright 2025 The Cockroach Authors. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthChangefeed        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowChangefeed          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupChangefeed = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Op_name = map[int32]string{
	0: "OP_UNSPECIFIED",
	1: "OP_CREATE",
	2: "OP_UPDATE",
	3: "OP_DELETE",
}
View Source
var Op_value = map[string]int32{
	"OP_UNSPECIFIED": 0,
	"OP_CREATE":      1,
	"OP_UPDATE":      2,
	"OP_DELETE":      3,
}

Functions

This section is empty.

Types

type Array

type Array struct {
	Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
}

Array represents an ordered list of values.

func (*Array) Descriptor

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

func (*Array) Marshal

func (m *Array) Marshal() (dAtA []byte, err error)

func (*Array) MarshalTo

func (m *Array) MarshalTo(dAtA []byte) (int, error)

func (*Array) MarshalToSizedBuffer

func (m *Array) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Array) ProtoMessage

func (*Array) ProtoMessage()

func (*Array) Reset

func (m *Array) Reset()

func (*Array) Size

func (m *Array) Size() (n int)

func (*Array) String

func (m *Array) String() string

func (*Array) Unmarshal

func (m *Array) Unmarshal(dAtA []byte) error

func (*Array) XXX_DiscardUnknown

func (m *Array) XXX_DiscardUnknown()

func (*Array) XXX_Marshal

func (m *Array) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Array) XXX_Merge

func (m *Array) XXX_Merge(src proto.Message)

func (*Array) XXX_Size

func (m *Array) XXX_Size() int

func (*Array) XXX_Unmarshal

func (m *Array) XXX_Unmarshal(b []byte) error

type BareEnvelope

type BareEnvelope struct {
	Values  map[string]*Value `` /* 153-byte string literal not displayed */
	XCrdb__ *Metadata         `protobuf:"bytes,2,opt,name=__crdb__,json=Crdb,proto3" json:"__crdb__,omitempty"`
}

BareEnvelope contains change data as a flat map along with CockroachDB-specific metadata under the '__crdb__' field.

func (*BareEnvelope) Descriptor

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

func (*BareEnvelope) Marshal

func (m *BareEnvelope) Marshal() (dAtA []byte, err error)

func (*BareEnvelope) MarshalTo

func (m *BareEnvelope) MarshalTo(dAtA []byte) (int, error)

func (*BareEnvelope) MarshalToSizedBuffer

func (m *BareEnvelope) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*BareEnvelope) ProtoMessage

func (*BareEnvelope) ProtoMessage()

func (*BareEnvelope) Reset

func (m *BareEnvelope) Reset()

func (*BareEnvelope) Size

func (m *BareEnvelope) Size() (n int)

func (*BareEnvelope) String

func (m *BareEnvelope) String() string

func (*BareEnvelope) Unmarshal

func (m *BareEnvelope) Unmarshal(dAtA []byte) error

func (*BareEnvelope) XXX_DiscardUnknown

func (m *BareEnvelope) XXX_DiscardUnknown()

func (*BareEnvelope) XXX_Marshal

func (m *BareEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BareEnvelope) XXX_Merge

func (m *BareEnvelope) XXX_Merge(src proto.Message)

func (*BareEnvelope) XXX_Size

func (m *BareEnvelope) XXX_Size() int

func (*BareEnvelope) XXX_Unmarshal

func (m *BareEnvelope) XXX_Unmarshal(b []byte) error

type BareResolved

type BareResolved struct {
	XCrdb__ *Resolved `protobuf:"bytes,1,opt,name=__crdb__,json=Crdb,proto3" json:"__crdb__,omitempty"`
}

BareResolved is a minimal envelope that wraps a resolved timestamp in a '__crdb__' field.

func (*BareResolved) Descriptor

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

func (*BareResolved) Marshal

func (m *BareResolved) Marshal() (dAtA []byte, err error)

func (*BareResolved) MarshalTo

func (m *BareResolved) MarshalTo(dAtA []byte) (int, error)

func (*BareResolved) MarshalToSizedBuffer

func (m *BareResolved) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*BareResolved) ProtoMessage

func (*BareResolved) ProtoMessage()

func (*BareResolved) Reset

func (m *BareResolved) Reset()

func (*BareResolved) Size

func (m *BareResolved) Size() (n int)

func (*BareResolved) String

func (m *BareResolved) String() string

func (*BareResolved) Unmarshal

func (m *BareResolved) Unmarshal(dAtA []byte) error

func (*BareResolved) XXX_DiscardUnknown

func (m *BareResolved) XXX_DiscardUnknown()

func (*BareResolved) XXX_Marshal

func (m *BareResolved) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BareResolved) XXX_Merge

func (m *BareResolved) XXX_Merge(src proto.Message)

func (*BareResolved) XXX_Size

func (m *BareResolved) XXX_Size() int

func (*BareResolved) XXX_Unmarshal

func (m *BareResolved) XXX_Unmarshal(b []byte) error

type Decimal

type Decimal struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
}

Decimal contains a fixed-point decimal value represented as a string.

func (*Decimal) Descriptor

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

func (*Decimal) Marshal

func (m *Decimal) Marshal() (dAtA []byte, err error)

func (*Decimal) MarshalTo

func (m *Decimal) MarshalTo(dAtA []byte) (int, error)

func (*Decimal) MarshalToSizedBuffer

func (m *Decimal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Decimal) ProtoMessage

func (*Decimal) ProtoMessage()

func (*Decimal) Reset

func (m *Decimal) Reset()

func (*Decimal) Size

func (m *Decimal) Size() (n int)

func (*Decimal) String

func (m *Decimal) String() string

func (*Decimal) Unmarshal

func (m *Decimal) Unmarshal(dAtA []byte) error

func (*Decimal) XXX_DiscardUnknown

func (m *Decimal) XXX_DiscardUnknown()

func (*Decimal) XXX_Marshal

func (m *Decimal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Decimal) XXX_Merge

func (m *Decimal) XXX_Merge(src proto.Message)

func (*Decimal) XXX_Size

func (m *Decimal) XXX_Size() int

func (*Decimal) XXX_Unmarshal

func (m *Decimal) XXX_Unmarshal(b []byte) error

type EnrichedEnvelope

type EnrichedEnvelope struct {
	After  *Record         `protobuf:"bytes,1,opt,name=after,proto3" json:"after,omitempty"`
	Before *Record         `protobuf:"bytes,2,opt,name=before,proto3" json:"before,omitempty"`
	Op     Op              `protobuf:"varint,3,opt,name=op,proto3,enum=changefeedpb.Op" json:"op,omitempty"`
	Key    *Key            `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"`
	TsNs   int64           `protobuf:"varint,5,opt,name=ts_ns,json=tsNs,proto3" json:"ts_ns,omitempty"`
	Source *EnrichedSource `protobuf:"bytes,6,opt,name=source,proto3" json:"source,omitempty"`
}

EnrichedEnvelope includes detailed context about the change event and source.

func (*EnrichedEnvelope) Descriptor

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

func (*EnrichedEnvelope) Marshal

func (m *EnrichedEnvelope) Marshal() (dAtA []byte, err error)

func (*EnrichedEnvelope) MarshalTo

func (m *EnrichedEnvelope) MarshalTo(dAtA []byte) (int, error)

func (*EnrichedEnvelope) MarshalToSizedBuffer

func (m *EnrichedEnvelope) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EnrichedEnvelope) ProtoMessage

func (*EnrichedEnvelope) ProtoMessage()

func (*EnrichedEnvelope) Reset

func (m *EnrichedEnvelope) Reset()

func (*EnrichedEnvelope) Size

func (m *EnrichedEnvelope) Size() (n int)

func (*EnrichedEnvelope) String

func (m *EnrichedEnvelope) String() string

func (*EnrichedEnvelope) Unmarshal

func (m *EnrichedEnvelope) Unmarshal(dAtA []byte) error

func (*EnrichedEnvelope) XXX_DiscardUnknown

func (m *EnrichedEnvelope) XXX_DiscardUnknown()

func (*EnrichedEnvelope) XXX_Marshal

func (m *EnrichedEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EnrichedEnvelope) XXX_Merge

func (m *EnrichedEnvelope) XXX_Merge(src proto.Message)

func (*EnrichedEnvelope) XXX_Size

func (m *EnrichedEnvelope) XXX_Size() int

func (*EnrichedEnvelope) XXX_Unmarshal

func (m *EnrichedEnvelope) XXX_Unmarshal(b []byte) error

type EnrichedSource

type EnrichedSource struct {
	JobId              string   `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	ChangefeedSink     string   `protobuf:"bytes,2,opt,name=changefeed_sink,json=changefeedSink,proto3" json:"changefeed_sink,omitempty"`
	DbVersion          string   `protobuf:"bytes,3,opt,name=db_version,json=dbVersion,proto3" json:"db_version,omitempty"`
	ClusterName        string   `protobuf:"bytes,4,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"`
	ClusterId          string   `protobuf:"bytes,5,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
	SourceNodeLocality string   `protobuf:"bytes,6,opt,name=source_node_locality,json=sourceNodeLocality,proto3" json:"source_node_locality,omitempty"`
	NodeName           string   `protobuf:"bytes,7,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"`
	NodeId             string   `protobuf:"bytes,8,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	MvccTimestamp      string   `protobuf:"bytes,9,opt,name=mvcc_timestamp,json=mvccTimestamp,proto3" json:"mvcc_timestamp,omitempty"`
	TsNs               int64    `protobuf:"varint,10,opt,name=ts_ns,json=tsNs,proto3" json:"ts_ns,omitempty"`
	TsHlc              string   `protobuf:"bytes,11,opt,name=ts_hlc,json=tsHlc,proto3" json:"ts_hlc,omitempty"`
	Origin             string   `protobuf:"bytes,12,opt,name=origin,proto3" json:"origin,omitempty"`
	DatabaseName       string   `protobuf:"bytes,13,opt,name=database_name,json=databaseName,proto3" json:"database_name,omitempty"`
	SchemaName         string   `protobuf:"bytes,14,opt,name=schema_name,json=schemaName,proto3" json:"schema_name,omitempty"`
	TableName          string   `protobuf:"bytes,15,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"`
	PrimaryKeys        []string `protobuf:"bytes,16,rep,name=primary_keys,json=primaryKeys,proto3" json:"primary_keys,omitempty"`
}

EnrichedSource records information about the origin and context of a change event, for operational traceability.

func (*EnrichedSource) Descriptor

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

func (*EnrichedSource) Marshal

func (m *EnrichedSource) Marshal() (dAtA []byte, err error)

func (*EnrichedSource) MarshalTo

func (m *EnrichedSource) MarshalTo(dAtA []byte) (int, error)

func (*EnrichedSource) MarshalToSizedBuffer

func (m *EnrichedSource) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EnrichedSource) ProtoMessage

func (*EnrichedSource) ProtoMessage()

func (*EnrichedSource) Reset

func (m *EnrichedSource) Reset()

func (*EnrichedSource) Size

func (m *EnrichedSource) Size() (n int)

func (*EnrichedSource) String

func (m *EnrichedSource) String() string

func (*EnrichedSource) Unmarshal

func (m *EnrichedSource) Unmarshal(dAtA []byte) error

func (*EnrichedSource) XXX_DiscardUnknown

func (m *EnrichedSource) XXX_DiscardUnknown()

func (*EnrichedSource) XXX_Marshal

func (m *EnrichedSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EnrichedSource) XXX_Merge

func (m *EnrichedSource) XXX_Merge(src proto.Message)

func (*EnrichedSource) XXX_Size

func (m *EnrichedSource) XXX_Size() int

func (*EnrichedSource) XXX_Unmarshal

func (m *EnrichedSource) XXX_Unmarshal(b []byte) error

type Key

type Key struct {
	Key map[string]*Value `` /* 147-byte string literal not displayed */
}

Key contains the primary key values for a row.

func (*Key) Descriptor

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

func (*Key) Marshal

func (m *Key) Marshal() (dAtA []byte, err error)

func (*Key) MarshalJSON

func (k *Key) MarshalJSON() ([]byte, error)

func (*Key) MarshalTo

func (m *Key) MarshalTo(dAtA []byte) (int, error)

func (*Key) MarshalToSizedBuffer

func (m *Key) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Key) ProtoMessage

func (*Key) ProtoMessage()

func (*Key) Reset

func (m *Key) Reset()

func (*Key) Size

func (m *Key) Size() (n int)

func (*Key) String

func (m *Key) String() string

func (*Key) Unmarshal

func (m *Key) Unmarshal(dAtA []byte) error

func (*Key) XXX_DiscardUnknown

func (m *Key) XXX_DiscardUnknown()

func (*Key) XXX_Marshal

func (m *Key) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Key) XXX_Merge

func (m *Key) XXX_Merge(src proto.Message)

func (*Key) XXX_Size

func (m *Key) XXX_Size() int

func (*Key) XXX_Unmarshal

func (m *Key) XXX_Unmarshal(b []byte) error

type Message

type Message struct {
	// Types that are valid to be assigned to Data:
	//	*Message_Wrapped
	//	*Message_Bare
	//	*Message_Enriched
	//	*Message_Resolved
	//	*Message_BareResolved
	Data isMessage_Data `protobuf_oneof:"data"`
}

Message is an enum of the different envelope types. This is what will be emitted to the client.

func (*Message) Descriptor

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

func (*Message) GetBare

func (m *Message) GetBare() *BareEnvelope

func (*Message) GetBareResolved

func (m *Message) GetBareResolved() *BareResolved

func (*Message) GetData

func (m *Message) GetData() isMessage_Data

func (*Message) GetEnriched

func (m *Message) GetEnriched() *EnrichedEnvelope

func (*Message) GetResolved

func (m *Message) GetResolved() *Resolved

func (*Message) GetWrapped

func (m *Message) GetWrapped() *WrappedEnvelope

func (*Message) Marshal

func (m *Message) Marshal() (dAtA []byte, err error)

func (*Message) MarshalTo

func (m *Message) MarshalTo(dAtA []byte) (int, error)

func (*Message) MarshalToSizedBuffer

func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) Size

func (m *Message) Size() (n int)

func (*Message) String

func (m *Message) String() string

func (*Message) Unmarshal

func (m *Message) Unmarshal(dAtA []byte) error

func (*Message) XXX_DiscardUnknown

func (m *Message) XXX_DiscardUnknown()

func (*Message) XXX_Marshal

func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Message) XXX_Merge

func (m *Message) XXX_Merge(src proto.Message)

func (*Message) XXX_OneofWrappers

func (*Message) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Message) XXX_Size

func (m *Message) XXX_Size() int

func (*Message) XXX_Unmarshal

func (m *Message) XXX_Unmarshal(b []byte) error

type MessageBatch

type MessageBatch struct {
	Payload []*Message `protobuf:"bytes,1,rep,name=payload,proto3" json:"payload,omitempty"`
}

MessageBatch is a batch of messages for use in webhook sinks.

func (*MessageBatch) Descriptor

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

func (*MessageBatch) Marshal

func (m *MessageBatch) Marshal() (dAtA []byte, err error)

func (*MessageBatch) MarshalTo

func (m *MessageBatch) MarshalTo(dAtA []byte) (int, error)

func (*MessageBatch) MarshalToSizedBuffer

func (m *MessageBatch) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MessageBatch) ProtoMessage

func (*MessageBatch) ProtoMessage()

func (*MessageBatch) Reset

func (m *MessageBatch) Reset()

func (*MessageBatch) Size

func (m *MessageBatch) Size() (n int)

func (*MessageBatch) String

func (m *MessageBatch) String() string

func (*MessageBatch) Unmarshal

func (m *MessageBatch) Unmarshal(dAtA []byte) error

func (*MessageBatch) XXX_DiscardUnknown

func (m *MessageBatch) XXX_DiscardUnknown()

func (*MessageBatch) XXX_Marshal

func (m *MessageBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MessageBatch) XXX_Merge

func (m *MessageBatch) XXX_Merge(src proto.Message)

func (*MessageBatch) XXX_Size

func (m *MessageBatch) XXX_Size() int

func (*MessageBatch) XXX_Unmarshal

func (m *MessageBatch) XXX_Unmarshal(b []byte) error

type Message_Bare

type Message_Bare struct {
	Bare *BareEnvelope `protobuf:"bytes,2,opt,name=bare,proto3,oneof" json:"bare,omitempty"`
}

func (*Message_Bare) MarshalTo

func (m *Message_Bare) MarshalTo(dAtA []byte) (int, error)

func (*Message_Bare) MarshalToSizedBuffer

func (m *Message_Bare) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Message_Bare) Size

func (m *Message_Bare) Size() (n int)

type Message_BareResolved

type Message_BareResolved struct {
	BareResolved *BareResolved `protobuf:"bytes,5,opt,name=bareResolved,proto3,oneof" json:"bareResolved,omitempty"`
}

func (*Message_BareResolved) MarshalTo

func (m *Message_BareResolved) MarshalTo(dAtA []byte) (int, error)

func (*Message_BareResolved) MarshalToSizedBuffer

func (m *Message_BareResolved) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Message_BareResolved) Size

func (m *Message_BareResolved) Size() (n int)

type Message_Enriched

type Message_Enriched struct {
	Enriched *EnrichedEnvelope `protobuf:"bytes,3,opt,name=enriched,proto3,oneof" json:"enriched,omitempty"`
}

func (*Message_Enriched) MarshalTo

func (m *Message_Enriched) MarshalTo(dAtA []byte) (int, error)

func (*Message_Enriched) MarshalToSizedBuffer

func (m *Message_Enriched) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Message_Enriched) Size

func (m *Message_Enriched) Size() (n int)

type Message_Resolved

type Message_Resolved struct {
	Resolved *Resolved `protobuf:"bytes,4,opt,name=resolved,proto3,oneof" json:"resolved,omitempty"`
}

func (*Message_Resolved) MarshalTo

func (m *Message_Resolved) MarshalTo(dAtA []byte) (int, error)

func (*Message_Resolved) MarshalToSizedBuffer

func (m *Message_Resolved) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Message_Resolved) Size

func (m *Message_Resolved) Size() (n int)

type Message_Wrapped

type Message_Wrapped struct {
	Wrapped *WrappedEnvelope `protobuf:"bytes,1,opt,name=wrapped,proto3,oneof" json:"wrapped,omitempty"`
}

func (*Message_Wrapped) MarshalTo

func (m *Message_Wrapped) MarshalTo(dAtA []byte) (int, error)

func (*Message_Wrapped) MarshalToSizedBuffer

func (m *Message_Wrapped) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Message_Wrapped) Size

func (m *Message_Wrapped) Size() (n int)

type Metadata

type Metadata struct {
	Updated       string `protobuf:"bytes,1,opt,name=updated,proto3" json:"updated,omitempty"`
	MvccTimestamp string `protobuf:"bytes,2,opt,name=mvcc_timestamp,json=mvccTimestamp,proto3" json:"mvcc_timestamp,omitempty"`
	Key           *Key   `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
	Topic         string `protobuf:"bytes,4,opt,name=topic,proto3" json:"topic,omitempty"`
}

Metadata contains CockroachDB-specific metadata about a change event. This message is also referred to as '__crdb__'.

func (*Metadata) Descriptor

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

func (*Metadata) Marshal

func (m *Metadata) Marshal() (dAtA []byte, err error)

func (*Metadata) MarshalTo

func (m *Metadata) MarshalTo(dAtA []byte) (int, error)

func (*Metadata) MarshalToSizedBuffer

func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) Reset

func (m *Metadata) Reset()

func (*Metadata) Size

func (m *Metadata) Size() (n int)

func (*Metadata) String

func (m *Metadata) String() string

func (*Metadata) Unmarshal

func (m *Metadata) Unmarshal(dAtA []byte) error

func (*Metadata) XXX_DiscardUnknown

func (m *Metadata) XXX_DiscardUnknown()

func (*Metadata) XXX_Marshal

func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Metadata) XXX_Merge

func (m *Metadata) XXX_Merge(src proto.Message)

func (*Metadata) XXX_Size

func (m *Metadata) XXX_Size() int

func (*Metadata) XXX_Unmarshal

func (m *Metadata) XXX_Unmarshal(b []byte) error

type Op

type Op int32

Op enumerates the types of operations represented in a change event.

const (
	Op_OP_UNSPECIFIED Op = 0
	Op_OP_CREATE      Op = 1
	Op_OP_UPDATE      Op = 2
	Op_OP_DELETE      Op = 3
)

func (Op) EnumDescriptor

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

func (Op) String

func (x Op) String() string

type Record

type Record struct {
	Values map[string]*Value `` /* 153-byte string literal not displayed */
}

Record represents a flat mapping of column names to values for a row.

func (*Record) Descriptor

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

func (*Record) Marshal

func (m *Record) Marshal() (dAtA []byte, err error)

func (*Record) MarshalTo

func (m *Record) MarshalTo(dAtA []byte) (int, error)

func (*Record) MarshalToSizedBuffer

func (m *Record) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Record) ProtoMessage

func (*Record) ProtoMessage()

func (*Record) Reset

func (m *Record) Reset()

func (*Record) Size

func (m *Record) Size() (n int)

func (*Record) String

func (m *Record) String() string

func (*Record) Unmarshal

func (m *Record) Unmarshal(dAtA []byte) error

func (*Record) XXX_DiscardUnknown

func (m *Record) XXX_DiscardUnknown()

func (*Record) XXX_Marshal

func (m *Record) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Record) XXX_Merge

func (m *Record) XXX_Merge(src proto.Message)

func (*Record) XXX_Size

func (m *Record) XXX_Size() int

func (*Record) XXX_Unmarshal

func (m *Record) XXX_Unmarshal(b []byte) error

type Resolved

type Resolved struct {
	Resolved string `protobuf:"bytes,1,opt,name=resolved,proto3" json:"resolved,omitempty"`
}

Resolved carries resolved timestamp information for a changefeed span.

func (*Resolved) Descriptor

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

func (*Resolved) Marshal

func (m *Resolved) Marshal() (dAtA []byte, err error)

func (*Resolved) MarshalTo

func (m *Resolved) MarshalTo(dAtA []byte) (int, error)

func (*Resolved) MarshalToSizedBuffer

func (m *Resolved) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Resolved) ProtoMessage

func (*Resolved) ProtoMessage()

func (*Resolved) Reset

func (m *Resolved) Reset()

func (*Resolved) Size

func (m *Resolved) Size() (n int)

func (*Resolved) String

func (m *Resolved) String() string

func (*Resolved) Unmarshal

func (m *Resolved) Unmarshal(dAtA []byte) error

func (*Resolved) XXX_DiscardUnknown

func (m *Resolved) XXX_DiscardUnknown()

func (*Resolved) XXX_Marshal

func (m *Resolved) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Resolved) XXX_Merge

func (m *Resolved) XXX_Merge(src proto.Message)

func (*Resolved) XXX_Size

func (m *Resolved) XXX_Size() int

func (*Resolved) XXX_Unmarshal

func (m *Resolved) XXX_Unmarshal(b []byte) error

type Value

type Value struct {
	// Types that are valid to be assigned to Value:
	//
	//	*Value_StringValue
	//	*Value_BytesValue
	//	*Value_Int32Value
	//	*Value_Int64Value
	//	*Value_FloatValue
	//	*Value_DoubleValue
	//	*Value_BoolValue
	//	*Value_TimestampValue
	//	*Value_ArrayValue
	//	*Value_TupleValue
	//	*Value_DecimalValue
	//	*Value_DateValue
	//	*Value_IntervalValue
	//	*Value_TimeValue
	//	*Value_UuidValue
	Value isValue_Value `protobuf_oneof:"value"`
}

Value represents a value of arbitrary type carried in a change event.

func (*Value) Descriptor

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

func (*Value) GetArrayValue

func (m *Value) GetArrayValue() *Array

func (*Value) GetBoolValue

func (m *Value) GetBoolValue() bool

func (*Value) GetBytesValue

func (m *Value) GetBytesValue() []byte

func (*Value) GetDateValue

func (m *Value) GetDateValue() string

func (*Value) GetDecimalValue

func (m *Value) GetDecimalValue() *Decimal

func (*Value) GetDoubleValue

func (m *Value) GetDoubleValue() float64

func (*Value) GetFloatValue

func (m *Value) GetFloatValue() float32

func (*Value) GetInt32Value

func (m *Value) GetInt32Value() int32

func (*Value) GetInt64Value

func (m *Value) GetInt64Value() int64

func (*Value) GetIntervalValue

func (m *Value) GetIntervalValue() string

func (*Value) GetStringValue

func (m *Value) GetStringValue() string

func (*Value) GetTimeValue

func (m *Value) GetTimeValue() string

func (*Value) GetTimestampValue

func (m *Value) GetTimestampValue() *types.Timestamp

func (*Value) GetTupleValue

func (m *Value) GetTupleValue() *Record

func (*Value) GetUuidValue

func (m *Value) GetUuidValue() string

func (*Value) GetValue

func (m *Value) GetValue() isValue_Value

func (*Value) Marshal

func (m *Value) Marshal() (dAtA []byte, err error)

func (*Value) MarshalJSON

func (v *Value) MarshalJSON() ([]byte, error)

MarshalJSON provides clean, unwrapped JSON output for changefeedpb.Value.

func (*Value) MarshalTo

func (m *Value) MarshalTo(dAtA []byte) (int, error)

func (*Value) MarshalToSizedBuffer

func (m *Value) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) Reset

func (m *Value) Reset()

func (*Value) Size

func (m *Value) Size() (n int)

func (*Value) String

func (m *Value) String() string

func (*Value) Unmarshal

func (m *Value) Unmarshal(dAtA []byte) error

func (*Value) XXX_DiscardUnknown

func (m *Value) XXX_DiscardUnknown()

func (*Value) XXX_Marshal

func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Value) XXX_Merge

func (m *Value) XXX_Merge(src proto.Message)

func (*Value) XXX_OneofWrappers

func (*Value) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*Value) XXX_Size

func (m *Value) XXX_Size() int

func (*Value) XXX_Unmarshal

func (m *Value) XXX_Unmarshal(b []byte) error

type Value_ArrayValue

type Value_ArrayValue struct {
	ArrayValue *Array `protobuf:"bytes,9,opt,name=array_value,json=arrayValue,proto3,oneof" json:"array_value,omitempty"`
}

func (*Value_ArrayValue) MarshalTo

func (m *Value_ArrayValue) MarshalTo(dAtA []byte) (int, error)

func (*Value_ArrayValue) MarshalToSizedBuffer

func (m *Value_ArrayValue) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Value_ArrayValue) Size

func (m *Value_ArrayValue) Size() (n int)

type Value_BoolValue

type Value_BoolValue struct {
	BoolValue bool `protobuf:"varint,7,opt,name=bool_value,json=boolValue,proto3,oneof" json:"bool_value,omitempty"`
}

func (*Value_BoolValue) MarshalTo

func (m *Value_BoolValue) MarshalTo(dAtA []byte) (int, error)

func (*Value_BoolValue) MarshalToSizedBuffer

func (m *Value_BoolValue) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Value_BoolValue) Size

func (m *Value_BoolValue) Size() (n int)

type Value_BytesValue

type Value_BytesValue struct {
	BytesValue []byte `protobuf:"bytes,2,opt,name=bytes_value,json=bytesValue,proto3,oneof" json:"bytes_value,omitempty"`
}

func (*Value_BytesValue) MarshalTo

func (m *Value_BytesValue) MarshalTo(dAtA []byte) (int, error)

func (*Value_BytesValue) MarshalToSizedBuffer

func (m *Value_BytesValue) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Value_BytesValue) Size

func (m *Value_BytesValue) Size() (n int)

type Value_DateValue

type Value_DateValue struct {
	DateValue string `protobuf:"bytes,12,opt,name=date_value,json=dateValue,proto3,oneof" json:"date_value,omitempty"`
}

func (*Value_DateValue) MarshalTo

func (m *Value_DateValue) MarshalTo(dAtA []byte) (int, error)

func (*Value_DateValue) MarshalToSizedBuffer

func (m *Value_DateValue) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Value_DateValue) Size

func (m *Value_DateValue) Size() (n int)

type Value_DecimalValue

type Value_DecimalValue struct {
	DecimalValue *Decimal `protobuf:"bytes,11,opt,name=decimal_value,json=decimalValue,proto3,oneof" json:"decimal_value,omitempty"`
}

func (*Value_DecimalValue) MarshalTo

func (m *Value_DecimalValue) MarshalTo(dAtA []byte) (int, error)

func (*Value_DecimalValue) MarshalToSizedBuffer

func (m *Value_DecimalValue) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Value_DecimalValue) Size

func (m *Value_DecimalValue) Size() (n int)

type Value_DoubleValue

type Value_DoubleValue struct {
	DoubleValue float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue,proto3,oneof" json:"double_value,omitempty"`
}

func (*Value_DoubleValue) MarshalTo

func (m *Value_DoubleValue) MarshalTo(dAtA []byte) (int, error)

func (*Value_DoubleValue) MarshalToSizedBuffer

func (m *Value_DoubleValue) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Value_DoubleValue) Size

func (m *Value_DoubleValue) Size() (n int)

type Value_FloatValue

type Value_FloatValue struct {
	FloatValue float32 `protobuf:"fixed32,5,opt,name=float_value,json=floatValue,proto3,oneof" json:"float_value,omitempty"`
}

func (*Value_FloatValue) MarshalTo

func (m *Value_FloatValue) MarshalTo(dAtA []byte) (int, error)

func (*Value_FloatValue) MarshalToSizedBuffer

func (m *Value_FloatValue) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Value_FloatValue) Size

func (m *Value_FloatValue) Size() (n int)

type Value_Int32Value

type Value_Int32Value struct {
	Int32Value int32 `protobuf:"varint,3,opt,name=int32_value,json=int32Value,proto3,oneof" json:"int32_value,omitempty"`
}

func (*Value_Int32Value) MarshalTo

func (m *Value_Int32Value) MarshalTo(dAtA []byte) (int, error)

func (*Value_Int32Value) MarshalToSizedBuffer

func (m *Value_Int32Value) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Value_Int32Value) Size

func (m *Value_Int32Value) Size() (n int)

type Value_Int64Value

type Value_Int64Value struct {
	Int64Value int64 `protobuf:"varint,4,opt,name=int64_value,json=int64Value,proto3,oneof" json:"int64_value,omitempty"`
}

func (*Value_Int64Value) MarshalTo

func (m *Value_Int64Value) MarshalTo(dAtA []byte) (int, error)

func (*Value_Int64Value) MarshalToSizedBuffer

func (m *Value_Int64Value) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Value_Int64Value) Size

func (m *Value_Int64Value) Size() (n int)

type Value_IntervalValue

type Value_IntervalValue struct {
	IntervalValue string `protobuf:"bytes,13,opt,name=interval_value,json=intervalValue,proto3,oneof" json:"interval_value,omitempty"`
}

func (*Value_IntervalValue) MarshalTo

func (m *Value_IntervalValue) MarshalTo(dAtA []byte) (int, error)

func (*Value_IntervalValue) MarshalToSizedBuffer

func (m *Value_IntervalValue) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Value_IntervalValue) Size

func (m *Value_IntervalValue) Size() (n int)

type Value_StringValue

type Value_StringValue struct {
	StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof" json:"string_value,omitempty"`
}

func (*Value_StringValue) MarshalTo

func (m *Value_StringValue) MarshalTo(dAtA []byte) (int, error)

func (*Value_StringValue) MarshalToSizedBuffer

func (m *Value_StringValue) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Value_StringValue) Size

func (m *Value_StringValue) Size() (n int)

type Value_TimeValue

type Value_TimeValue struct {
	TimeValue string `protobuf:"bytes,14,opt,name=time_value,json=timeValue,proto3,oneof" json:"time_value,omitempty"`
}

func (*Value_TimeValue) MarshalTo

func (m *Value_TimeValue) MarshalTo(dAtA []byte) (int, error)

func (*Value_TimeValue) MarshalToSizedBuffer

func (m *Value_TimeValue) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Value_TimeValue) Size

func (m *Value_TimeValue) Size() (n int)

type Value_TimestampValue

type Value_TimestampValue struct {
	TimestampValue *types.Timestamp `protobuf:"bytes,8,opt,name=timestamp_value,json=timestampValue,proto3,oneof" json:"timestamp_value,omitempty"`
}

func (*Value_TimestampValue) MarshalTo

func (m *Value_TimestampValue) MarshalTo(dAtA []byte) (int, error)

func (*Value_TimestampValue) MarshalToSizedBuffer

func (m *Value_TimestampValue) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Value_TimestampValue) Size

func (m *Value_TimestampValue) Size() (n int)

type Value_TupleValue

type Value_TupleValue struct {
	TupleValue *Record `protobuf:"bytes,10,opt,name=tuple_value,json=tupleValue,proto3,oneof" json:"tuple_value,omitempty"`
}

func (*Value_TupleValue) MarshalTo

func (m *Value_TupleValue) MarshalTo(dAtA []byte) (int, error)

func (*Value_TupleValue) MarshalToSizedBuffer

func (m *Value_TupleValue) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Value_TupleValue) Size

func (m *Value_TupleValue) Size() (n int)

type Value_UuidValue

type Value_UuidValue struct {
	UuidValue string `protobuf:"bytes,15,opt,name=uuid_value,json=uuidValue,proto3,oneof" json:"uuid_value,omitempty"`
}

func (*Value_UuidValue) MarshalTo

func (m *Value_UuidValue) MarshalTo(dAtA []byte) (int, error)

func (*Value_UuidValue) MarshalToSizedBuffer

func (m *Value_UuidValue) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Value_UuidValue) Size

func (m *Value_UuidValue) Size() (n int)

type WrappedEnvelope

type WrappedEnvelope struct {
	After         *Record `protobuf:"bytes,1,opt,name=after,proto3" json:"after,omitempty"`
	Before        *Record `protobuf:"bytes,2,opt,name=before,proto3" json:"before,omitempty"`
	Updated       string  `protobuf:"bytes,4,opt,name=updated,proto3" json:"updated,omitempty"`
	MvccTimestamp string  `protobuf:"bytes,5,opt,name=mvcc_timestamp,json=mvccTimestamp,proto3" json:"mvcc_timestamp,omitempty"`
	Key           *Key    `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"`
	Topic         string  `protobuf:"bytes,7,opt,name=topic,proto3" json:"topic,omitempty"`
}

WrappedEnvelope includes both the changed data and contextual metadata about the change.

func (*WrappedEnvelope) Descriptor

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

func (*WrappedEnvelope) Marshal

func (m *WrappedEnvelope) Marshal() (dAtA []byte, err error)

func (*WrappedEnvelope) MarshalTo

func (m *WrappedEnvelope) MarshalTo(dAtA []byte) (int, error)

func (*WrappedEnvelope) MarshalToSizedBuffer

func (m *WrappedEnvelope) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*WrappedEnvelope) ProtoMessage

func (*WrappedEnvelope) ProtoMessage()

func (*WrappedEnvelope) Reset

func (m *WrappedEnvelope) Reset()

func (*WrappedEnvelope) Size

func (m *WrappedEnvelope) Size() (n int)

func (*WrappedEnvelope) String

func (m *WrappedEnvelope) String() string

func (*WrappedEnvelope) Unmarshal

func (m *WrappedEnvelope) Unmarshal(dAtA []byte) error

func (*WrappedEnvelope) XXX_DiscardUnknown

func (m *WrappedEnvelope) XXX_DiscardUnknown()

func (*WrappedEnvelope) XXX_Marshal

func (m *WrappedEnvelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WrappedEnvelope) XXX_Merge

func (m *WrappedEnvelope) XXX_Merge(src proto.Message)

func (*WrappedEnvelope) XXX_Size

func (m *WrappedEnvelope) XXX_Size() int

func (*WrappedEnvelope) XXX_Unmarshal

func (m *WrappedEnvelope) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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