Documentation
¶
Index ¶
Constants ¶
View Source
const ( Version = "1.0.9" // DefaultLogFormat string = "2006年01月02日 15:04:05.000" DefaultLogFormat string = "2006年01月02日 15時04分05.000秒" )
Variables ¶
View Source
var MetricAllPrefixes = map[string]MetricPrefix{ "quetta": {Symbol: "Q", Base10: math.Pow(10, 30), Pow: 30, FullName: "quetta", Adoption: 2022}, "ronna": {Symbol: "R", Base10: math.Pow(10, 27), Pow: 27, FullName: "ronna", Adoption: 2022}, "yotta": {Symbol: "Y", Base10: math.Pow(10, 24), Pow: 24, FullName: "yotta", Adoption: 1991}, "zetta": {Symbol: "Z", Base10: math.Pow(10, 21), Pow: 21, FullName: "zetta", Adoption: 1991}, "exa": {Symbol: "E", Base10: math.Pow(10, 18), Pow: 18, FullName: "exa", Adoption: 1975}, "peta": {Symbol: "P", Base10: math.Pow(10, 15), Pow: 15, FullName: "peta", Adoption: 1975}, "tera": {Symbol: "T", Base10: math.Pow(10, 12), Pow: 12, FullName: "tera", Adoption: 1960}, "giga": {Symbol: "G", Base10: math.Pow(10, 9), Pow: 9, FullName: "giga", Adoption: 1960}, "mega": {Symbol: "M", Base10: math.Pow(10, 6), Pow: 6, FullName: "mega", Adoption: 1873}, "kilo": {Symbol: "k", Base10: math.Pow(10, 3), Pow: 3, FullName: "kilo", Adoption: 1795}, "hecto": {Symbol: "h", Base10: math.Pow(10, 2), Pow: 2, FullName: "hecto", Adoption: 1795}, "deca": {Symbol: "da", Base10: math.Pow(10, 1), Pow: 1, FullName: "deca", Adoption: 1795}, "none": {Symbol: "", Base10: math.Pow(10, 0), Pow: 0, FullName: "none", Adoption: 1795}, "deci": {Symbol: "d", Base10: math.Pow(10, -1), Pow: -1, FullName: "deci", Adoption: 1795}, "centi": {Symbol: "c", Base10: math.Pow(10, -2), Pow: -2, FullName: "centi", Adoption: 1795}, "milli": {Symbol: "m", Base10: math.Pow(10, -3), Pow: -3, FullName: "milli", Adoption: 1795}, "micro": {Symbol: "µ", Base10: math.Pow(10, -6), Pow: -6, FullName: "micro", Adoption: 1873}, "nano": {Symbol: "n", Base10: math.Pow(10, -9), Pow: -9, FullName: "nano", Adoption: 1960}, "pico": {Symbol: "p", Base10: math.Pow(10, -12), Pow: -12, FullName: "pico", Adoption: 1960}, "femto": {Symbol: "f", Base10: math.Pow(10, -15), Pow: -15, FullName: "femto", Adoption: 1964}, "atto": {Symbol: "a", Base10: math.Pow(10, -18), Pow: -18, FullName: "atto", Adoption: 1964}, "zepto": {Symbol: "z", Base10: math.Pow(10, -21), Pow: -21, FullName: "zepto", Adoption: 1991}, "yocto": {Symbol: "y", Base10: math.Pow(10, -24), Pow: -24, FullName: "yocto", Adoption: 1991}, "ronto": {Symbol: "r", Base10: math.Pow(10, -27), Pow: -27, FullName: "ronto", Adoption: 2022}, "quecto": {Symbol: "q", Base10: math.Pow(10, -30), Pow: -30, FullName: "quecto", Adoption: 2022}, }
View Source
var MetricCommonPrefixes = map[string]MetricPrefix{ "quetta": {Symbol: "Q", Base10: math.Pow(10, 30), Pow: 30, FullName: "quetta", Adoption: 2022}, "ronna": {Symbol: "R", Base10: math.Pow(10, 27), Pow: 27, FullName: "ronna", Adoption: 2022}, "yotta": {Symbol: "Y", Base10: math.Pow(10, 24), Pow: 24, FullName: "yotta", Adoption: 1991}, "zetta": {Symbol: "Z", Base10: math.Pow(10, 21), Pow: 21, FullName: "zetta", Adoption: 1991}, "exa": {Symbol: "E", Base10: math.Pow(10, 18), Pow: 18, FullName: "exa", Adoption: 1975}, "peta": {Symbol: "P", Base10: math.Pow(10, 15), Pow: 15, FullName: "peta", Adoption: 1975}, "tera": {Symbol: "T", Base10: math.Pow(10, 12), Pow: 12, FullName: "tera", Adoption: 1960}, "giga": {Symbol: "G", Base10: math.Pow(10, 9), Pow: 9, FullName: "giga", Adoption: 1960}, "mega": {Symbol: "M", Base10: math.Pow(10, 6), Pow: 6, FullName: "mega", Adoption: 1873}, "kilo": {Symbol: "k", Base10: math.Pow(10, 3), Pow: 3, FullName: "kilo", Adoption: 1795}, "none": {Symbol: "", Base10: math.Pow(10, 0), Pow: 0, FullName: "none", Adoption: 1795}, "milli": {Symbol: "m", Base10: math.Pow(10, -3), Pow: -3, FullName: "milli", Adoption: 1795}, "micro": {Symbol: "µ", Base10: math.Pow(10, -6), Pow: -6, FullName: "micro", Adoption: 1873}, "nano": {Symbol: "n", Base10: math.Pow(10, -9), Pow: -9, FullName: "nano", Adoption: 1960}, "pico": {Symbol: "p", Base10: math.Pow(10, -12), Pow: -12, FullName: "pico", Adoption: 1960}, "femto": {Symbol: "f", Base10: math.Pow(10, -15), Pow: -15, FullName: "femto", Adoption: 1964}, "atto": {Symbol: "a", Base10: math.Pow(10, -18), Pow: -18, FullName: "atto", Adoption: 1964}, "zepto": {Symbol: "z", Base10: math.Pow(10, -21), Pow: -21, FullName: "zepto", Adoption: 1991}, "yocto": {Symbol: "y", Base10: math.Pow(10, -24), Pow: -24, FullName: "yocto", Adoption: 1991}, "ronto": {Symbol: "r", Base10: math.Pow(10, -27), Pow: -27, FullName: "ronto", Adoption: 2022}, "quecto": {Symbol: "q", Base10: math.Pow(10, -30), Pow: -30, FullName: "quecto", Adoption: 2022}, }
Functions ¶
func DefaultDnsOpts ¶
func DefaultDnsOpts() dnsOpts
Types ¶
type ActiveForwarder ¶
type Forwarder ¶
type Forwarder struct {
Server netip.AddrPort `yaml:"server"`
Test_domains []string `yaml:"test_domains"`
Ftype ForwarderType `yaml:"ftype"` // 'dns', 'tls', 'http', 'dnscrypt'
}
type ForwarderGroup ¶
type ForwarderType ¶
type ForwarderType string
const ( ForwarderTypeDNS ForwarderType = "dns" ForwarderTypeTLS ForwarderType = "tls" ForwarderTypeHTTP ForwarderType = "http" ForwarderTypeDNSCrypt ForwarderType = "dnscrypt" )
Click to show internal directories.
Click to hide internal directories.