mirror of
https://github.com/nabbar/golib.git
synced 2025-10-28 10:01:34 +08:00
Package Profiling
- new package to use/consume CPU / MEM pprof root package - create a file on same location as runable binary to store profile Package HTTPClient - add message function called on each Dial/DialContext call function - function message can be nil Package Server - add generic function for recover message / catching - implement this recovring function into runner StartStop & Ticker Package Logger: - implement generic recovering function into hook - fix bug if instance is an invalid instance of fields or entry
This commit is contained in:
@@ -26,8 +26,10 @@
|
||||
package httpcli_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
libdur "github.com/nabbar/golib/duration"
|
||||
@@ -59,7 +61,9 @@ var _ = Describe("HttpCli", func() {
|
||||
Transport: htcdns.TransportConfig{},
|
||||
}
|
||||
|
||||
dns = htcdns.New(ctx, &opt, nil)
|
||||
dns = htcdns.New(ctx, &opt, nil, func(msg string) {
|
||||
_, _ = fmt.Fprintln(os.Stdout, msg)
|
||||
})
|
||||
|
||||
cli = dns.DefaultClient()
|
||||
Expect(cli).ToNot(BeNil())
|
||||
|
||||
Reference in New Issue
Block a user