Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetConfigFilePath ¶
func SetConfigFilePath(path string)
Types ¶
type ConfigOptions ¶
type ConfigOptions struct {
Log struct {
ConsoleLevel string `json:"console-level" yaml:"console-level"`
FileLevel string `json:"file-level" yaml:"file-level"`
FilePath string `json:"file-path" yaml:"file-path"`
} `json:"log" yaml:"log"`
Web struct {
Domain string `json:"domain" yaml:"domain"`
Port string `json:"port" yaml:"port"`
}
SourceFiles []string `json:"source-files" yaml:"source-files"`
DatabaseUrl string `json:"database-url" yaml:"database-url"`
TGApiUrl string `json:"TG-api-url" yaml:"TG-api-url"`
CrawlInterval uint64 `json:"crawl-interval" yaml:"crawl-interval"`
HealthCheck struct {
Url string `json:"url" yaml:"url"`
Timeout int `json:"timeout" yaml:"timeout"`
MaxConnection int `json:"max-conn" yaml:"max-conn"`
} `json:"healthcheck" yaml:"healthcheck"`
SpeedTest struct {
IsUsed bool `json:"is_used" yaml:"is_used"`
Interval uint64 `json:"interval" yaml:"interval"`
Timeout int `json:"timeout" yaml:"timeout"`
MaxConnection int `json:"max-conn" yaml:"max-conn"`
} `json:"speedtest" yaml:"speedtest"`
}
var Config ConfigOptions
Config 配置
func (ConfigOptions) HostUrl ¶
func (config ConfigOptions) HostUrl() string
Click to show internal directories.
Click to hide internal directories.