config

package
v0.0.0-...-805313b Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Connection ConnectionConfig `mapstructure:"connection" validate:"required" mask:"struct"`
	HTTP       HTTPConfig       `mapstructure:"http" validate:"required" mask:"struct"`
	Kafka      KafkaConfig      `mapstructure:"kafka" validate:"required" mask:"struct"`
	Logger     LoggerConfig     `mapstructure:"logger" validate:"required" mask:"struct"`
	Worker     WorkerConfig     `mapstructure:"worker" validate:"required" mask:"struct"`
}

type ConnectionConfig

type ConnectionConfig struct {
	RPCURL string `mapstructure:"rpc_url" validate:"required"`
	APIKey string `mapstructure:"api_key" validate:"required" mask:"password"`
}

type HTTPConfig

type HTTPConfig struct {
	MaxRetryOnError        int  `mapstructure:"max_retry_on_error" validate:"required"`
	RetryDelayMilliseconds int  `mapstructure:"retry_delay_milliseconds" validate:"required"`
	ReportRetryAttempts    bool `mapstructure:"report_retry_attempts"`
}

type KafkaConfig

type KafkaConfig struct {
	Broker             string  `mapstructure:"broker" validate:"required"`
	BlockTopic         string  `mapstructure:"block_topic" validate:"required"`
	BlockConsumerGroup *string `mapstructure:"block_consumer_group"`
	TransactionTopic   string  `mapstructure:"transaction_topic" validate:"required"`
}

type LoggerConfig

type LoggerConfig struct {
	Level string `mapstructure:"level" validate:"required" `
}

type WorkerConfig

type WorkerConfig struct {
	Total int `mapstructure:"total" validate:"required"`
}

Jump to

Keyboard shortcuts

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