Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { URL string `conf:"default=localhost"` Port string `conf:"default=9093"` Events string `conf:"default=events"` Items string `conf:"default=items"` KeepAlive int `conf:"range=60:300,default=300"` Username string `conf:"optional"` Password string `conf:"optional"` CaFile string `conf:"optional"` ClientCertFile string `conf:"optional"` ClientKeyFile string `conf:"optional"` Retry int `conf:"default=0"` Timeout int `conf:"default=1"` TLSAuth bool `conf:"default=false"` EnableTLS bool `conf:"optional"` }
Configuration hold kafka configuration tags bases on Zabbix configuration package from plugin support.
type DefaultProducer ¶
type DefaultProducer struct {
// contains filtered or unexported fields
}
DefaultProducer produces data to Kafka broker.
func NewProducer ¶
func NewProducer(c *Configuration) (*DefaultProducer, error)
NewProducer creates Kafka producers from with provided configuration.
func (*DefaultProducer) Close ¶
func (p *DefaultProducer) Close() error
Close closes the underlying async producer.
func (*DefaultProducer) ProduceEvent ¶
func (p *DefaultProducer) ProduceEvent(key, message string)
ProduceEvent produces Kafka message to the event topic in the broker provided in the async producer.
func (*DefaultProducer) ProduceItem ¶
func (p *DefaultProducer) ProduceItem(key, message string)
ProduceItem produces Kafka message to the item topic in the broker provided in the async producer.
Click to show internal directories.
Click to hide internal directories.