mirror of
https://github.com/eosswedenorg/thalos
synced 2026-08-30 20:58:12 +02:00
internal/config: skip creating a Config struct with default values. those should be set by flags or viper in the builder
This commit is contained in:
parent
e54a4fa929
commit
69a36e016c
3 changed files with 1 additions and 64 deletions
|
|
@ -1,11 +1,7 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/eosswedenorg/thalos/internal/log"
|
||||
|
||||
shipclient "github.com/eosswedenorg-go/antelope-ship-client"
|
||||
)
|
||||
|
||||
type RedisConfig struct {
|
||||
|
|
@ -42,24 +38,3 @@ type Config struct {
|
|||
|
||||
Telegram TelegramConfig `yaml:"telegram" mapstructure:"telegram"`
|
||||
}
|
||||
|
||||
// Create a new Config object with default values
|
||||
func New() Config {
|
||||
return Config{
|
||||
MessageCodec: "json",
|
||||
Log: log.Config{
|
||||
MaxFileSize: 10 * 1000 * 1000, // 10 mb
|
||||
MaxTime: time.Hour * 24,
|
||||
},
|
||||
Ship: ShipConfig{
|
||||
StartBlockNum: shipclient.NULL_BLOCK_NUMBER,
|
||||
EndBlockNum: shipclient.NULL_BLOCK_NUMBER,
|
||||
MaxMessagesInFlight: 10,
|
||||
IrreversibleOnly: false,
|
||||
},
|
||||
Redis: RedisConfig{
|
||||
Addr: "localhost:6379",
|
||||
Prefix: "ship",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue