Documentation
¶
Overview ¶
Package destination is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { sdk.DefaultDestinationMiddleware common.Config // Topic is the Kafka topic. It can contain a [Go template](https://pkg.go.dev/text/template) // that will be executed for each record to determine the topic. By default, // the topic is the value of the `opencdc.collection` metadata field. Topic string `json:"topic" default:"{{ index .Metadata \"opencdc.collection\" }}"` // Acks defines the number of acknowledges from partition replicas required // before receiving a response to a produce request. // None = fire and forget, one = wait for the leader to acknowledge the // writes, all = wait for the full ISR to acknowledge the writes. Acks string `json:"acks" default:"all" validate:"inclusion=none|one|all"` // DeliveryTimeout for write operation performed by the Writer. DeliveryTimeout time.Duration `json:"deliveryTimeout"` // Compression set the compression codec to be used to compress messages. Compression string `json:"compression" default:"snappy" validate:"inclusion=none|gzip|snappy|lz4|zstd"` // BatchBytes limits the maximum size of a request in bytes before being // sent to a partition. This mirrors Kafka's max.message.bytes. BatchBytes int32 `json:"batchBytes" default:"1000012"` // contains filtered or unexported fields }
func (*Config) CompressionCodecs ¶
func (c *Config) CompressionCodecs() []kgo.CompressionCodec
func (*Config) ParseTopic ¶ added in v0.8.0
ParseTopic returns either a static topic or a function that determines the topic for each record individually. If the topic is neither static nor a template, an error is returned.
func (*Config) RequiredAcks ¶
func (*Config) Validate ¶
Validate executes manual validations beyond what is defined in struct tags.
func (*Config) WithKafkaConnectKeyFormat ¶
func (c *Config) WithKafkaConnectKeyFormat()
type FranzProducer ¶
type FranzProducer struct {
// contains filtered or unexported fields
}
func NewFranzProducer ¶
func NewFranzProducer(ctx context.Context, cfg Config) (*FranzProducer, error)
type MockProducer ¶
type MockProducer struct {
// contains filtered or unexported fields
}
MockProducer is a mock of Producer interface.
func NewMockProducer ¶
func NewMockProducer(ctrl *gomock.Controller) *MockProducer
NewMockProducer creates a new mock instance.
func (*MockProducer) Close ¶
func (m *MockProducer) Close(arg0 context.Context) error
Close mocks base method.
func (*MockProducer) EXPECT ¶
func (m *MockProducer) EXPECT() *MockProducerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockProducerMockRecorder ¶
type MockProducerMockRecorder struct {
// contains filtered or unexported fields
}
MockProducerMockRecorder is the mock recorder for MockProducer.
Click to show internal directories.
Click to hide internal directories.