Files
Go_I2p/lib/config/router.go

40 lines
894 B
Go
Raw Normal View History

2016-01-28 10:16:26 -05:00
package config
import (
"path/filepath"
)
2016-01-28 10:16:26 -05:00
// router.config options
type RouterConfig struct {
// the path to the base config directory where per-system defaults are stored
BaseDir string
// the path to the working config directory where files are changed
WorkingDir string
2016-08-17 09:19:56 -04:00
// netdb configuration
NetDb *NetDbConfig
// configuration for bootstrapping into the network
Bootstrap *BootstrapConfig
2016-01-28 10:16:26 -05:00
}
func defaultBase() string {
return filepath.Join(BuildI2PDirPath(), "base")
}
func defaultConfig() string {
return filepath.Join(BuildI2PDirPath(), "config")
}
2016-01-28 10:16:26 -05:00
// defaults for router
var defaultRouterConfig = &RouterConfig{
NetDb: &DefaultNetDbConfig,
Bootstrap: &DefaultBootstrapConfig,
BaseDir: defaultBase(),
WorkingDir: defaultConfig(),
2016-01-28 10:16:26 -05:00
}
func DefaultRouterConfig() *RouterConfig {
return defaultRouterConfig
}
var RouterConfigProperties = DefaultRouterConfig()