config

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package config provides configuration for the Kafka event source

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address string `json:"address" koanf:"address" default:"localhost:10000"`
	Debug   bool   `json:"debug" koanf:"debug" default:"false"`
	Kafka   struct {
		Addresses []string `json:"addresses" koanf:"addresses"`
	} `json:"kafkaAddresses" koanf:"kafkaAddresses"`
	Consumer struct {
		Enabled bool     `json:"enabled" koanf:"enabled" default:"false"`
		GroupID string   `json:"groupId" koanf:"groupId" default:"test-group"`
		Topics  []string `json:"topics" koanf:"topics" default:"test-topic"`
		Output  struct {
			Stdout bool   `json:"stdout" koanf:"stdout" default:"false"`
			File   string `json:"file" koanf:"file" default:"consumer.log"`
		} `json:"output"`
	}
}

type ConsumerConfig

type ConsumerConfig struct {
	Enabled          bool           `json:"enabled" koanf:"enabled" default:"false"`
	GroupID          string         `json:"groupId" koanf:"groupId"`
	Topics           []string       `json:"topics" koanf:"topics"`
	OffsetFromNewest bool           `json:"offsetFromNewest" koanf:"offsetFromNewest" default:"false"`
	ConsumerOutput   ConsumerOutput `json:"output" koanf:"output"`
}

type ConsumerOutput

type ConsumerOutput struct {
	Stdout       bool   `json:"stdout" koanf:"stdout" default:"false"`
	FileLocation string `json:"fileLocation" koanf:"fileLocation" default:"consumer.log"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL