Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { NewProducer(c ProducerConfig, options ...ProducerOption) (writer.Writer, error) Servers() string }
Interface .
type ProducerConfig ¶
type ProducerConfig struct { Topic string `file:"topic"` Parallelism uint64 `file:"parallelism" default:"3" env:"PROVIDER_KAFKA_V2_PRODUCER_PARALLELISM"` Async bool `file:"async" default:"true" env:"PROVIDER_KAFKA_V2_PRODUCER_ASYNC"` Timeout time.Duration `file:"timeout" default:"30s" env:"PROVIDER_KAFKA_V2_PRODUCER_TIMEOUT"` Batch struct { Size int `file:"size" default:"100" env:"PROVIDER_KAFKA_V2_PRODUCER_BATCH_SIZE"` SizeBytes int64 `file:"size_bytes" default:"1048576" env:"PROVIDER_KAFKA_V2_PRODUCER_BATCH_SIZE_BYTES"` Timeout time.Duration `file:"timeout" default:"800ms" env:"PROVIDER_KAFKA_V2_PRODUCER_BATCH_TIMEOUT"` } `file:"batch"` }
ProducerConfig .
type ProducerOption ¶
type ProducerOption interface {
// contains filtered or unexported methods
}
ProducerOption .
func WithAsyncWriteErrorHandler ¶
func WithAsyncWriteErrorHandler(eh func(error) error) ProducerOption
WithAsyncWriteErrorHandler .
Click to show internal directories.
Click to hide internal directories.