Documentation
¶
Index ¶
Constants ¶
View Source
const (
PackageIdHeaderName = "PACKAGE_ID"
)
Variables ¶
This section is empty.
Functions ¶
func AddSchemaRegistryHeader ¶
AddSchemaRegistryHeader puts header to the message to make it compatible with Kafka avro serde that uses schema registry. The header consists of 5 bytes: 1st byte is always zero. bytes from 2 to 5 contains ID of the schema defined in schema registry
Types ¶
type AppSettings ¶
type AppSettings struct { HostName string `yaml:"HostName"` Port string `yaml:"Port"` ConnectionTimeToLiveSec int `yaml:"ConnectionTimeToLiveSec"` }
func (*AppSettings) GetConnectionTimeToLiveSec ¶
func (s *AppSettings) GetConnectionTimeToLiveSec() time.Duration
func (*AppSettings) GetFullAddress ¶
func (a *AppSettings) GetFullAddress() string
type KafkaProducer ¶
type KafkaProducer struct {
// contains filtered or unexported fields
}
func (*KafkaProducer) Close ¶
func (p *KafkaProducer) Close() error
func (*KafkaProducer) Initialize ¶
func (p *KafkaProducer) Initialize(cfg *KafkaSettings, logger *log.Logger) error
func (*KafkaProducer) Produce ¶
func (p *KafkaProducer) Produce(measurementPackage *egtsschema.MeasurementPackage) error
type KafkaSettings ¶
type LogSettings ¶
type LogSettings struct {
Level string `yaml:"Level"`
}
func (*LogSettings) GetLevel ¶
func (l *LogSettings) GetLevel() log.Lvl
type Settings ¶
type Settings struct { App AppSettings `yaml:"app"` Log LogSettings `yaml:"log"` Kafka KafkaSettings `yaml:"kafka"` }
func (*Settings) LoadFromEnv ¶
func (*Settings) LoadFromFile ¶
Click to show internal directories.
Click to hide internal directories.