func NewKafkaClient(config *types.Configuration, stats *types.Statistics, promStats *types.PromStatistics, statsdClient, dogstatsdClient *statsd.Client) (*Client, error) {
	kafkaWriter := &kafka.Writer{
		Addr:  kafka.TCP(config.Kafka.HostPort),
		Topic: config.Kafka.Topic,
	}
	return &Client{
		OutputType:      "Kafka",
		Config:          config,
		Stats:           stats,
		PromStats:       promStats,
		StatsdClient:    statsdClient,
		DogstatsdClient: dogstatsdClient,
		KafkaProducer:   kafkaWriter,
	}, nil
}
NewKafkaClient returns a new output.Client for accessing the Apache Kafka.
package outputs
import (
	"context"
	"encoding/json"
	"log"
	"github.com/DataDog/datadog-go/statsd"
	"github.com/segmentio/kafka-go"
	"github.com/falcosecurity/falcosidekick/types"
)