Your ROOT_URL in app.ini is http://git.slaventius.ru/ but you are visiting http://37.143.12.169/test3k/authDB/blame/commit/b80d509593fa578ce7ad621346a824143986966b/internal/transport/kafka/kafka_reader.go You should set ROOT_URL correctly, otherwise the web may not work correctly.

28 lines
485 B

2 years ago
package kafka
import (
"github.com/segmentio/kafka-go"
)
type KafkaReader struct {
reader *kafka.Reader
}
func NewReader(topic string, address ...string) *KafkaReader {
return &KafkaReader{
// reader: &kafka.Reader{
// Topic: topic,
// Balancer: &kafka.LeastBytes{},
// Addr: kafka.TCP(address...),
// },
}
}
func (s *KafkaReader) Close() error {
return s.reader.Close()
}
func (s *KafkaReader) ReadMessage(key string, value string) error {
return nil
}