configure

package
v0.0.0-...-c0fde58 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckConfig

func CheckConfig(config *DeployConfig)

CheckConfig used to check config and fix some configuration

Types

type CacheConfig

type CacheConfig struct {
	FileCacheSize int64
	FileCachePath string
	MemCacheSize  int64
}

type CertConfig

type CertConfig struct {
	GenerateCert bool // not in yaml
	CertPath     string
	KeyPath      string
}

type DeployConfig

type DeployConfig struct {
	LogLevel    string
	ProxyConfig ProxyConfig
	P2PConfig   P2PConfig
}

DeployConfig is server config

func InitConfig

func InitConfig(cfgFile string) *DeployConfig

InitConfig used to load config from disk

type P2PConfig

type P2PConfig struct {
	RunMode        string
	RootList       []string
	NodeIP         string
	DetectAddr     string
	APIKey         string
	ServeBySSL     bool
	Port           int
	MyAddr         string // not in yaml
	CacheConfig    CacheConfig
	PrefetchConfig PrefetchConfig
}

type PrefetchConfig

type PrefetchConfig struct {
	PrefetchEnable bool
	PrefetchThread int
}

type ProxyConfig

type ProxyConfig struct {
	Port       int
	ProxyHTTPS bool
	CertConfig CertConfig
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL