config

package
v0.0.0-...-adffadb Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExecutionTimestamp = "executionTimestamp"
)

Variables

This section is empty.

Functions

func Print

func Print(config *Config)

Types

type Config

type Config struct {
	HttpServer   HttpServerConfig
	Storage      StorageConfig
	Kafka        KafkaConfig
	Frequency    int32
	WorkerEnable bool
}

func GetConfig

func GetConfig() *Config

func LoadConfig

func LoadConfig(path string) (*Config, error)

type HttpServerConfig

type HttpServerConfig struct {
	Port        int
	Mode        string
	ContextPath string
}

type KafkaConfig

type KafkaConfig struct {
	//if disabled then uses redis pub-sub
	Enabled bool
	//broker1:9092,broker2:9092,broker3:9092
	Brokers            string
	Group              string
	SchedulerTopic     string
	TaskExecutionTopic string
	//IBM-specific configuration
	SaslEnabled   bool
	SaslUser      string
	SaslPassword  string
	SaslMechanism sarama.SASLMechanism
	TlsEnable     bool
}

type StorageConfig

type StorageConfig struct {
	RedisPass           string
	RedisHost           string
	RedisDb             int
	SchedulerChanel     string
	TaskExecutionChanel string
	SchedulerKeyName    string
}

Jump to

Keyboard shortcuts

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