portal/protocols/s5/config.go

28 lines
674 B
Go
Raw Normal View History

package s5
import (
s5config "git.lumeweb.com/LumeWeb/libs5-go/config"
"git.lumeweb.com/LumeWeb/portal/config"
)
var _ config.ProtocolConfig = (*Config)(nil)
type Config struct {
2024-02-27 08:18:02 +00:00
*s5config.NodeConfig `mapstructure:",squash"`
DbPath string `mapstructure:"db_path"`
}
func (c Config) Defaults() map[string]interface{} {
defaults := map[string]interface{}{}
2024-02-27 08:02:11 +00:00
defaults["p2p.peers.initial"] = []string{
2024-03-07 09:38:56 +00:00
"wss://z2DWuWNZcdSyZLpXFK2uCU3haaWMXrDAgxzv17sDEMHstZb@s5.garden/s5/p2p",
"wss://z2DWuPbL5pweybXnEB618pMnV58ECj2VPDNfVGm3tFqBvjF@s5.ninja/s5/p2p",
}
defaults["db_path"] = "s5.db"
defaults["p2p.max_connection_attempts"] = 10
return defaults
}