Documentation ¶
Index ¶
Constants ¶
View Source
const (
EnvPrefix = "ROBOT"
)
Variables ¶
This section is empty.
Functions ¶
func ValidateConfig ¶ added in v0.0.3
ValidateConfig validates config
Types ¶
type BatchLimits ¶
type Config ¶
type Config struct { LogLevel string `mapstructure:"logLevel" validate:"required"` LogType string `mapstructure:"logType" validate:"required"` ServerPort uint `mapstructure:"serverPort"` ProfilePath string `mapstructure:"profilePath" validate:"required"` UserName string `mapstructure:"userName" validate:"required"` TxSwapPrefix string `mapstructure:"txSwapPrefix" validate:"required"` TxMultiSwapPrefix string `mapstructure:"txMultiSwapPrefix" validate:"required"` TxPreimagePrefix string `mapstructure:"txPreimagePrefix" validate:"required"` DelayAfterChRobotError time.Duration `mapstructure:"delayAfterChRobotError"` DefaultBatchLimits *BatchLimits `mapstructure:"defaultBatchLimits"` RedisStorage *RedisStorage `mapstructure:"redisStor" validate:"required"` PromMetrics *PromMetrics `mapstructure:"promMetrics"` DefaultRobotExecOpts ExecuteOptions `mapstructure:"defaultRobotExecOpts"` Robots []*Robot `mapstructure:"robots" validate:"required,dive"` }
func GetConfigFromPath ¶ added in v0.0.3
GetConfigFromPath returns config from specified path
func (Config) WithoutSensitiveData ¶
WithoutSensitiveData returns copy of config with empty sensitive data. This config might be used for trace logging.
type ExecuteOptions ¶
func (ExecuteOptions) EffExecuteTimeout ¶
func (eo ExecuteOptions) EffExecuteTimeout(defOpts ExecuteOptions) (time.Duration, error)
type PromMetrics ¶
type PromMetrics struct {
PrefixForMetrics string `mapstructure:"prefix"`
}
type RedisStorage ¶
type Robot ¶
type Robot struct { ChName string `mapstructure:"chName" validate:"required"` InitMinExecBlockNum uint64 `mapstructure:"initExecBlockNum"` SrcChannels []*SrcChannel `mapstructure:"src" validate:"required,dive"` BatchLimits *BatchLimits `mapstructure:"batchLimits"` CollectorsBufSize uint `mapstructure:"collectorsBufSize"` ExecOpts ExecuteOptions `mapstructure:"execOpts"` }
type SrcChannel ¶
Click to show internal directories.
Click to hide internal directories.