Files
Go_I2p/lib/config/doc.md
2025-02-26 20:52:16 -05:00

3.3 KiB

config

-- import "github.com/go-i2p/go-i2p/lib/config"

Usage

const GOI2P_BASE_DIR = ".go-i2p"
var (
	CfgFile string
)
var DefaultBootstrapConfig = BootstrapConfig{
	LowPeerThreshold: 10,

	ReseedServers: []*ReseedConfig{},
}

default configuration for network bootstrap

var DefaultNetDbConfig = NetDbConfig{
	Path: filepath.Join(defaultConfig(), "netDb"),
}

default settings for netdb

var RouterConfigProperties = DefaultRouterConfig()

func InitConfig

func InitConfig()

func UpdateRouterConfig

func UpdateRouterConfig()

type BootstrapConfig

type BootstrapConfig struct {
	// if we have less than this many peers we should reseed
	LowPeerThreshold int
	// reseed servers
	ReseedServers []*ReseedConfig
}

type NetDbConfig

type NetDbConfig struct {
	// path to network database directory
	Path string
}

local network database configuration

type ReseedConfig

type ReseedConfig struct {
	// url of reseed server
	Url string
	// fingerprint of reseed su3 signing key
	SU3Fingerprint string
}

configuration for 1 reseed server

type RouterConfig

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
	// netdb configuration
	NetDb *NetDbConfig
	// configuration for bootstrapping into the network
	Bootstrap *BootstrapConfig
}

router.config options

func DefaultRouterConfig

func DefaultRouterConfig() *RouterConfig

config

-- import "github.com/go-i2p/go-i2p/lib/config"

config.svg

Usage

const GOI2P_BASE_DIR = ".go-i2p"
var (
	CfgFile string
)
var DefaultBootstrapConfig = BootstrapConfig{
	LowPeerThreshold: 10,

	ReseedServers: []*ReseedConfig{},
}

default configuration for network bootstrap

var DefaultNetDbConfig = NetDbConfig{
	Path: filepath.Join(defaultConfig(), "netDb"),
}

default settings for netdb

var RouterConfigProperties = DefaultRouterConfig()

func InitConfig

func InitConfig()

func UpdateRouterConfig

func UpdateRouterConfig()

type BootstrapConfig

type BootstrapConfig struct {
	// if we have less than this many peers we should reseed
	LowPeerThreshold int
	// reseed servers
	ReseedServers []*ReseedConfig
}

type NetDbConfig

type NetDbConfig struct {
	// path to network database directory
	Path string
}

local network database configuration

type ReseedConfig

type ReseedConfig struct {
	// url of reseed server
	Url string
	// fingerprint of reseed su3 signing key
	SU3Fingerprint string
}

configuration for 1 reseed server

type RouterConfig

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
	// netdb configuration
	NetDb *NetDbConfig
	// configuration for bootstrapping into the network
	Bootstrap *BootstrapConfig
}

router.config options

func DefaultRouterConfig

func DefaultRouterConfig() *RouterConfig

config

github.com/go-i2p/go-i2p/lib/config