- Added Punycode encoding implementation for cookie handling. - Introduced serialization for cookie jar with JSON support. - Created a comprehensive README for the tracing provider, detailing configuration and usage. - Developed a configuration structure for tracing, including sampler and reporter settings. - Implemented the provider logic to initialize Jaeger tracer with logging capabilities. - Ensured graceful shutdown of the tracer on application exit.
18 lines
346 B
Smarty
18 lines
346 B
Smarty
package {{.Name}}
|
|
|
|
import (
|
|
"go.ipao.vip/atom/container"
|
|
"go.ipao.vip/atom/opt"
|
|
)
|
|
|
|
func Provide(opts ...opt.Option) error {
|
|
o := opt.New(opts...)
|
|
var config Config
|
|
if err := o.UnmarshalConfig(&config); err != nil {
|
|
return err
|
|
}
|
|
return container.Container.Provide(func() (*Config, error) {
|
|
return &Config{}, nil
|
|
}, o.DiOptions()...)
|
|
}
|