Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING CHANGE: netcore: scope non-common fields #47

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ go 1.23.3

require (
github.com/miekg/dns v1.1.62
github.com/rbmk-project/common v0.3.0
github.com/rbmk-project/dnscore v0.5.0
github.com/rbmk-project/common v0.4.0
github.com/rbmk-project/dnscore v0.6.0
github.com/rogpeppe/go-internal v1.13.1
golang.org/x/sys v0.27.0
)
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ github.com/miekg/dns v1.1.62 h1:cN8OuEF1/x5Rq6Np+h1epln8OiyPWV+lROx9LxcGgIQ=
github.com/miekg/dns v1.1.62/go.mod h1:mvDlcItzm+br7MToIKqkglaGhlFMHJ9DTNNWONWXbNQ=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rbmk-project/common v0.3.0 h1:g9iX/lg5kvzmgxgr4xbkcCjA2jfazM1zAyLKzLD/3iU=
github.com/rbmk-project/common v0.3.0/go.mod h1:uzrFIJl8SEOpgS2pSeBFLUgqc4D1lIcGk/EYuxkFO0U=
github.com/rbmk-project/dnscore v0.5.0 h1:GaWr4SUJFJzjAgkZ9kJdS0I0BWHPnObD/lZaZzPfB9c=
github.com/rbmk-project/dnscore v0.5.0/go.mod h1:ENuxqOG44rTIByt412eghWPRvTg/G5RkE6Truv+tapQ=
github.com/rbmk-project/common v0.4.0 h1:gw7f/YdPxcUZ81cO9IMzEPDhsc6tOUte1m0OFi6euFg=
github.com/rbmk-project/common v0.4.0/go.mod h1:uzrFIJl8SEOpgS2pSeBFLUgqc4D1lIcGk/EYuxkFO0U=
github.com/rbmk-project/dnscore v0.6.0 h1:23rRsLBwTkQqJQMVPf4kimzGSZsw29EY7u3ffHbWkKg=
github.com/rbmk-project/dnscore v0.6.0/go.mod h1:Ct9RhR8HTI6tnq6/HSbzB/F8bk3k7E/6hmEctxSecUQ=
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
Expand Down
8 changes: 4 additions & 4 deletions netcore/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (c *connWrapper) Read(buf []byte) (int, error) {
c.netx.Logger.InfoContext(
c.ctx,
"readStart",
slog.Int("count", len(buf)),
slog.Int("ioBufferSize", len(buf)),
slog.String("localAddr", c.laddr),
slog.String("protocol", c.protocol),
slog.String("remoteAddr", c.raddr),
Expand All @@ -131,7 +131,7 @@ func (c *connWrapper) Read(buf []byte) (int, error) {
c.netx.Logger.InfoContext(
c.ctx,
"readDone",
slog.Int("count", count),
slog.Int("ioBytesCount", count),
slog.Any("err", err),
slog.String("localAddr", c.laddr),
slog.String("protocol", c.protocol),
Expand Down Expand Up @@ -169,7 +169,7 @@ func (c *connWrapper) Write(data []byte) (n int, err error) {
c.netx.Logger.InfoContext(
c.ctx,
"writeStart",
slog.Int("count", len(data)),
slog.Int("ioBufferSize", len(data)),
slog.String("localAddr", c.laddr),
slog.String("protocol", c.protocol),
slog.String("remoteAddr", c.raddr),
Expand All @@ -183,7 +183,7 @@ func (c *connWrapper) Write(data []byte) (n int, err error) {
c.netx.Logger.InfoContext(
c.ctx,
"writeDone",
slog.Int("count", count),
slog.Int("ioBytesCount", count),
slog.Any("err", err),
slog.String("localAddr", c.laddr),
slog.String("protocol", c.protocol),
Expand Down
6 changes: 3 additions & 3 deletions netcore/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (nx *Network) emitLookupHostStart(ctx context.Context, domain string) time.
nx.Logger.InfoContext(
ctx,
"lookupHostStart",
slog.String("domain", domain),
slog.String("dnsLookupDomain", domain),
slog.Time("t", t0),
)
}
Expand All @@ -94,8 +94,8 @@ func (nx *Network) emitLookupHostDone(ctx context.Context,
nx.Logger.InfoContext(
ctx,
"lookupHostDone",
slog.String("domain", domain),
slog.Any("addrs", addrs),
slog.String("dnsLookupDomain", domain),
slog.Any("dnsResolvedAddrs", addrs),
slog.Any("err", err),
slog.Time("t0", t0),
slog.Time("t", nx.timeNow()),
Expand Down