package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Packages
Package cdcevent facilitates conversion from low level roachpb.KeyValue into a higher
level Row.
Package checkpoint contains code responsible for handling changefeed checkpoints.
Package kafkaauth provides Kafka SASL authentication mechanisms for use with the changefeed kafka sinks (v1 & v2).
Package kvevent defines kvfeed events and buffers to communicate them locally.
Package kvfeed provides an abstraction to stream kvs to a buffer.
Package mocks is a generated GoMock package.
Package resolvedspan contains helper data structures for changefeeds to handle resolved spans.
Package schemafeed provides SchemaFeed, which can be used to track schema updates.
# Functions
AllTargets gets all the targets listed in a ChangefeedDetails, from the statement time name map in old protos or the TargetSpecifications in new ones.
AuthorizeChangefeedJobAccess determines if a user has access to the changefeed job denoted by the supplied jobID and payload.
AvroNameToSQLName is the inverse of SQLNameToAvroName.
EncodeAsJSONChangefeedWithFlags implements the crdb_internal.to_json_as_changefeed_with_flags builtin.
FetchChangefeedUsageBytes fetches the total number of bytes of data watched by the given changefeed.
KafkaNameToSQLName is the inverse of SQLNameToKafkaName except when SQLNameToKafkaName had to truncate.
MakeMemoryMetrics instantiates the metrics holder for memory monitors of changefeeds.
MakeMetrics makes the metrics for changefeed monitoring.
MakeTopicNamer creates a TopicNamer.
NewParallelIO creates a new ParallelIO.
SQLNameToAvroName escapes a sql table name into a valid avro record or field name.
SQLNameToKafkaName escapes a sql table name into a valid kafka topic name.
TestingClearSchemaRegistrySingleton clears out the singleton so that different tests don't pollute each other.
TestingGetEventTypeColIdx returns the index of the extra column added to every parquet file which indicate the type of event that generated a particular row.
WithJoinByte overrides the default '.' separator between a table and family name.
WithPrefix defines a prefix string for all topics named by this TopicNamer.
WithSanitizeFn defines a post-processor for all topic names.
WithSingleName causes all topics named by this TopicNamer to be the same, overriding things like the table name but not options like WithPrefix.
# Variables
ErrNotEnoughQuota indicates that a request was not emitted due to a lack of quota.
KafkaV2Enabled determines whether or not the refactored Kafka sink or the deprecated sink should be used.
PubsubV2Enabled determines whether or not the refactored Webhook sink or the deprecated sink should be used.
RangeDistributionStrategy is used to determine how the changefeed balances ranges between nodes.
WebhookV2Enabled determines whether or not the refactored Webhook sink or the deprecated sink should be used.
# Structs
AggMetrics are aggregated metrics keeping track of aggregated changefeed performance indicators, combined with a limited number of per-changefeed indicators.
ChangefeedConfig provides a version-agnostic wrapper around jobspb.ChangefeedDetails.
JobScopedUsageMetrics are aggregated metrics keeping track of per-changefeed usage metrics by job_id.
Metrics are for production monitoring of changefeeds.
ParallelIO allows performing blocking "IOHandler" calls on in parallel.
Retry is a thin wrapper around retry.Retry which resets retry state if changefeed been running for sufficiently long time.
TestingKnobs are the testing knobs for changefeed.
TopicIdentifier is a minimal set of fields that uniquely identifies a topic.
TopicNamer generates and caches the strings used as topic keys by sinks, using target specifications, options, and sink-specific string manipulation.
# Interfaces
AdmittedIORequest is an admitted IORequest.
BatchBuffer is an interface to aggregate KVs into a payload that can be sent to the sink.
Encoder turns a row into a serialized changefeed key, value, or resolved timestamp.
EventSink is the interface used when emitting changefeed events and ensuring they were received.
IORequest represents an abstract unit of IO that has a set of keys upon which sequential ordering of fulfillment must be enforced.
IOResult contains the original IORequest and its resultant error.
KafkaAdminClientV2 is a small interface restricting the functionality in *kadm.Client.
KafkaClientV2 is a small interface restricting the functionality in *kgo.Client.
PulsarClient extracts relevant methods from pulsar.Client.
ResolvedTimestampSink is the interface used when emitting resolved timestamps.
Sink is an abstraction for anything that a changefeed may emit into.
SinkClient is an interface to an external sink, where messages are written into batches as they arrive and once ready are flushed out.
SinkPayload is an interface representing a sink-specific representation of a batch of messages that is ready to be emitted by its Flush method.
SinkWithEncoder A sink which both encodes and emits row events.
SinkWithTopics extends the Sink interface to include a method that returns the topics that a changefeed will emit to.
TopicDescriptor describes topic emitted by the sink.
TopicNameOption is an optional argument to MakeTopicNamer.
# Type aliases
IOHandler performs a blocking IO operation on an IORequest.