Documentation ¶
Index ¶
- Constants
- func ConfigOptionDeclareWithDefault() interface{}
- func InstallConfigOptionsWatchDog(dog func(cc *ConfigOptions))
- func InstallSpecOptionsWatchDog(dog func(cc *SpecOptions))
- func SpecOptionDeclareWithDefault() interface{}
- type ConfigOption
- func WithFood(v *string) ConfigOption
- func WithTestBool(v bool) ConfigOption
- func WithTestInt(v int) ConfigOption
- func WithTestInt64(v int64) ConfigOption
- func WithTestMapIntInt(v map[int]int) ConfigOption
- func WithTestMapIntString(v map[int]string) ConfigOption
- func WithTestMapStringInt(v map[string]int) ConfigOption
- func WithTestMapStringString(v map[string]string) ConfigOption
- func WithTestNil(v interface{}) ConfigOption
- func WithTestNilFunc(v func()) ConfigOption
- func WithTestSliceBool(v ...bool) ConfigOption
- func WithTestSliceByte(v []byte) ConfigOption
- func WithTestSliceInt(v ...int) ConfigOption
- func WithTestSliceInt64(v ...int64) ConfigOption
- func WithTestSliceIntEmpty(v ...int) ConfigOption
- func WithTestSliceIntNil(v ...int) ConfigOption
- func WithTestSliceString(v ...string) ConfigOption
- func WithTestString(v string) ConfigOption
- func WithWalk(v func()) ConfigOption
- type ConfigOptions
- type MFuncTest
- type MInterface
- type MTest
- type SpecOption
- func AppendSpecOptionsSliceOpt(v ...int32) SpecOption
- func WithSpecOptionsSliceOpt(v ...int32) SpecOption
- func WithSpecOptionsTestBool1(v bool) SpecOption
- func WithSpecOptionsTestInt1(v int) SpecOption
- func WithSpecOptionsTestNil1(v interface{}) SpecOption
- func WithSpecOptionsTestNilFunc1(v func()) SpecOption
- func WithSpecOptionsTestReserved2Inner1(v int) SpecOption
- type SpecOptions
- type TestInt
- type TestString
- type TestType
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func ConfigOptionDeclareWithDefault ¶
func ConfigOptionDeclareWithDefault() interface{}
func InstallConfigOptionsWatchDog ¶
func InstallConfigOptionsWatchDog(dog func(cc *ConfigOptions))
InstallConfigOptionsWatchDog install watch dog
func InstallSpecOptionsWatchDog ¶
func InstallSpecOptionsWatchDog(dog func(cc *SpecOptions))
InstallSpecOptionsWatchDog install watch dog
func SpecOptionDeclareWithDefault ¶
func SpecOptionDeclareWithDefault() interface{}
Types ¶
type ConfigOption ¶
type ConfigOption func(cc *ConfigOptions) ConfigOption
ConfigOption option define
func WithTestBool ¶
func WithTestBool(v bool) ConfigOption
func WithTestInt64 ¶
func WithTestInt64(v int64) ConfigOption
func WithTestMapIntInt ¶
func WithTestMapIntInt(v map[int]int) ConfigOption
func WithTestMapIntString ¶
func WithTestMapIntString(v map[int]string) ConfigOption
func WithTestMapStringInt ¶
func WithTestMapStringInt(v map[string]int) ConfigOption
func WithTestMapStringString ¶
func WithTestMapStringString(v map[string]string) ConfigOption
MapStringString Doc
func WithTestSliceBool ¶
func WithTestSliceBool(v ...bool) ConfigOption
func WithTestSliceByte ¶
func WithTestSliceByte(v []byte) ConfigOption
func WithTestSliceInt ¶
func WithTestSliceInt(v ...int) ConfigOption
func WithTestSliceInt64 ¶
func WithTestSliceInt64(v ...int64) ConfigOption
func WithTestSliceIntNil ¶
func WithTestSliceIntNil(v ...int) ConfigOption
func WithTestSliceString ¶
func WithTestSliceString(v ...string) ConfigOption
func WithTestString ¶
func WithTestString(v string) ConfigOption
type ConfigOptions ¶
type ConfigOptions struct { // test comment 1 // test comment 2 TestNil interface{} // test comment 3 TestBool bool // test comment 4 // 这里是函数注释1 // 这里是函数注释2 TestInt int // default 32 TestInt64 int64 // int64 line TestSliceInt []int // slice int TestSliceInt64 []int64 // slice int64 line TestSliceString []string // slice string TestSliceBool []bool // slice bool line comment TestSliceIntNil []int // TestSliceIntNil line comment TestSliceByte []byte // TestSliceByte line comment // SliceInt Doc TestSliceIntEmpty []int TestMapIntInt map[int]int // TestMapIntInt line comment TestMapIntString map[int]string // TestMapIntString line comment TestMapStringInt map[string]int // TestMapStringInt line comment // MapStringString Doc TestMapStringString map[string]string // MapStringString Line Comment TestString string // Food Doc Food (*string) // Food Line Comment // Walk Doc Walk func() // Walk Line Comment // TestNilFunc TestNilFunc (func()) // 中文1 // TestReserved1_ TestReserved1 []byte // 在调优或者运行阶段,我们可能需要动态查看连接池中的一些指标, // 来判断设置的值是否合理,或者检测连接池是否有异常情况出现 TestReserved2 int // TestReserved2Inner after }
Google Public DNS provides two distinct DoH APIs at these endpoints Using the GET method can reduce latency, as it is cached more effectively. RFC 8484 GET requests must have a ?dns= query parameter with a Base64Url encoded DNS message. The GET method is the only method supported for the JSON API.
func NewConfigOptions ¶
func NewConfigOptions(opts ...ConfigOption) *ConfigOptions
NewConfigOptions create options instance.
func (*ConfigOptions) ApplyOption ¶
func (cc *ConfigOptions) ApplyOption(opts ...ConfigOption)
ApplyOption modify options
func (*ConfigOptions) GetSetOption ¶
func (cc *ConfigOptions) GetSetOption(opt ConfigOption) ConfigOption
GetSetOption modify and get last option
func (*ConfigOptions) SetOption ¶
func (cc *ConfigOptions) SetOption(opt ConfigOption)
SetOption modify options
type MFuncTest ¶
type MFuncTest struct { //dd TestInt *MTest //v2 int32 *gen.Generator MInterface }
MFuncTest CCCC XX X X X X
type MInterface ¶
type SpecOption ¶
type SpecOption func(cc *SpecOptions) SpecOption
SpecOption option define
func AppendSpecOptionsSliceOpt ¶
func AppendSpecOptionsSliceOpt(v ...int32) SpecOption
func WithSpecOptionsTestBool1 ¶
func WithSpecOptionsTestBool1(v bool) SpecOption
func WithSpecOptionsTestNil1 ¶
func WithSpecOptionsTestNil1(v interface{}) SpecOption
test comment 5 test comment 6
func WithSpecOptionsTestNilFunc1 ¶
func WithSpecOptionsTestNilFunc1(v func()) SpecOption
func WithSpecOptionsTestReserved2Inner1 ¶
func WithSpecOptionsTestReserved2Inner1(v int) SpecOption
sql.DB对外暴露出了其运行时的状态db.DBStats,sql.DB在关闭,创建,释放连接时候,会维护更新这个状态。 我们可以通过prometheus来收集连接池状态,然后在grafana面板上配置指标,使指标可以动态的展示。
type SpecOptions ¶
type SpecOptions struct { // test comment 5 // test comment 6 TestNil1 interface{} // test comment 1 TestBool1 bool // test comment 2 // 这里是函数注释3 // 这里是函数注释4 TestInt1 int TestNilFunc1 (func()) // 中文2 TestReserved2 []byte // sql.DB对外暴露出了其运行时的状态db.DBStats,sql.DB在关闭,创建,释放连接时候,会维护更新这个状态。 // 我们可以通过prometheus来收集连接池状态,然后在grafana面板上配置指标,使指标可以动态的展示。 TestReserved2Inner1 int // Test Append Func SliceOpt []int32 }
HTTP parsing and communication with DNS resolver was successful, and the response body content is a DNS response in either binary or JSON encoding, depending on the query endpoint, Accept header and GET parameters.
func NewSpecOptions ¶
func NewSpecOptions(opts ...SpecOption) *SpecOptions
NewSpecOptions create options instance.
func (*SpecOptions) ApplyOption ¶
func (cc *SpecOptions) ApplyOption(opts ...SpecOption)
ApplyOption modify options
func (*SpecOptions) GetSetOption ¶
func (cc *SpecOptions) GetSetOption(opt SpecOption) SpecOption
GetSetOption modify and get last option
func (*SpecOptions) SetOption ¶
func (cc *SpecOptions) SetOption(opt SpecOption)
SetOption modify options
type TestString ¶
type TestString = testdata.TestString // comment for test string 2
TestString comment for test string 1