Documentation ¶
Index ¶
- Constants
- func Mechanism(saslType, userName, password, algo string) (sasl.Mechanism, error)
- type Config
- type RenderTopicFail
- type SASL
- type Sink
- func (s *Sink) Category() api.Category
- func (s *Sink) Config() interface{}
- func (s *Sink) Consume(batch api.Batch) api.Result
- func (s *Sink) Init(context api.Context) error
- func (s *Sink) SetCodec(c codec.Codec)
- func (s *Sink) Start() error
- func (s *Sink) Stop()
- func (s *Sink) String() string
- func (s *Sink) Type() api.Type
Constants ¶
View Source
const ( BalanceHash = "hash" BalanceRoundRobin = "roundRobin" BalanceLeastBytes = "leastBytes" CompressionGzip = "gzip" CompressionSnappy = "snappy" CompressionLz4 = "lz4" CompressionZstd = "zstd" SASLNoneType = "" SASLPlainType = "plain" SASLSCRAMType = "scram" AlgorithmSHA256 = "sha256" AlgorithmSHA512 = "sha512" )
View Source
const Type = "kafka"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Brokers []string `yaml:"brokers,omitempty" validate:"required"` Topic string `yaml:"topic,omitempty" validate:"required" default:"loggie"` IfRenderTopicFailed RenderTopicFail `yaml:"ifRenderTopicFailed,omitempty"` IgnoreUnknownTopicOrPartition bool `yaml:"ignoreUnknownTopicOrPartition,omitempty"` Balance string `yaml:"balance,omitempty" default:"roundRobin"` Compression string `yaml:"compression,omitempty" default:"gzip"` MaxAttempts int `yaml:"maxAttempts,omitempty"` BatchSize int `yaml:"batchSize,omitempty"` BatchBytes int64 `yaml:"batchBytes,omitempty"` BatchTimeout time.Duration `yaml:"batchTimeout,omitempty"` ReadTimeout time.Duration `yaml:"readTimeout,omitempty"` WriteTimeout time.Duration `yaml:"writeTimeout,omitempty"` RequiredAcks int `yaml:"requiredAcks,omitempty"` SASL SASL `yaml:"sasl,omitempty"` PartitionKey string `yaml:"partitionKey,omitempty"` }
func (*Config) SetDefaults ¶ added in v1.5.0
func (c *Config) SetDefaults()
type RenderTopicFail ¶ added in v1.5.0
type SASL ¶
Click to show internal directories.
Click to hide internal directories.