Compare commits

...

4 Commits
v1.9 ... master

2 changed files with 37 additions and 35 deletions

44
go.mod
View File

@ -1,34 +1,34 @@
module git.hpds.cc/Component/network
go 1.19
go 1.23
require (
git.hpds.cc/Component/mq_coder v0.0.0-20221010064749-174ae7ae3340
github.com/matoous/go-nanoid/v2 v2.0.0
github.com/quic-go/quic-go v0.33.0
github.com/stretchr/testify v1.8.0
go.uber.org/zap v1.23.0
gopkg.in/natefinch/lumberjack.v2 v2.0.0
git.hpds.cc/Component/mq_coder v0.0.0-20241213034522-3a3512d94b34
github.com/matoous/go-nanoid/v2 v2.1.0
github.com/quic-go/quic-go v0.48.2
github.com/stretchr/testify v1.10.0
go.uber.org/zap v1.27.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1
)
require (
github.com/BurntSushi/toml v1.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/onsi/ginkgo/v2 v2.2.0 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
github.com/onsi/ginkgo/v2 v2.22.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/quic-go/qtls-go1-19 v0.2.1 // indirect
github.com/quic-go/qtls-go1-20 v0.1.1 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/crypto v0.4.0 // indirect
golang.org/x/exp v0.0.0-20221205204356-47842c84f3db // indirect
golang.org/x/mod v0.6.0 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/tools v0.2.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/mock v0.5.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/exp v0.0.0-20241210194714-1829a127f884 // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.32.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/tools v0.28.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

View File

@ -2,11 +2,9 @@
package router
import (
"fmt"
"sync"
"git.hpds.cc/Component/network/frame"
herr "git.hpds.cc/Component/network/hpds_err"
"git.hpds.cc/Component/network/metadata"
)
@ -61,19 +59,23 @@ func (r *defaultRoute) Add(connId string, name string, observeDataTags []frame.T
}
}
if !ok {
return fmt.Errorf("SFN[%s] does not exist in config functions", name)
//return fmt.Errorf("SFN[%s] does not exist in config functions", name)
//item := config.App{
// Name: name,
//}
r.functions = append(r.functions, name)
}
LOOP:
for _, conn := range r.data {
for connId, n := range conn {
if n == name {
err = herr.NewDuplicateNameError(connId, fmt.Errorf("SFN[%s] is already linked to another connection", name))
delete(conn, connId)
break LOOP
}
}
}
//LOOP:
//for _, conn := range r.data {
// for connId, n := range conn {
// if n == name {
// err = herr.NewDuplicateNameError(connId, fmt.Errorf("SFN[%s] is already linked to another connection", name))
// delete(conn, connId)
// break LOOP
// }
// }
//}
for _, tag := range observeDataTags {
conn := r.data[tag]