mirror of
https://github.com/postmannen/ctrl.git
synced 2024-12-14 12:37:31 +00:00
updated yaml package, and removed debug info
This commit is contained in:
parent
ba29a417e7
commit
fac451ec0f
3 changed files with 4 additions and 11 deletions
2
go.mod
2
go.mod
|
@ -16,7 +16,7 @@ require (
|
|||
github.com/prometheus/client_golang v1.11.0
|
||||
github.com/rivo/tview v0.0.0-20220106183741-90d72bc664f5
|
||||
go.etcd.io/bbolt v1.3.5
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
)
|
||||
|
||||
require (
|
||||
|
|
2
go.sum
2
go.sum
|
@ -245,3 +245,5 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
|
|
|
@ -340,7 +340,6 @@ func (m methodREQKeysAllow) handler(proc process, message Message, node string)
|
|||
|
||||
}()
|
||||
|
||||
// HERE:
|
||||
// If new keys were allowed into the main map, we should send out one
|
||||
// single update to all the registered nodes to inform of an update.
|
||||
// NB: If a node is not reachable at the time the update is sent it is
|
||||
|
@ -366,22 +365,15 @@ func (m methodREQKeysAllow) handler(proc process, message Message, node string)
|
|||
return nil
|
||||
}()
|
||||
|
||||
fmt.Printf("\n DEBUG DEBUG DEBUG 1 \n\n")
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Printf("\n DEBUG DEBUG DEBUG 2 \n\n")
|
||||
|
||||
// proc.centralAuth.pki.nodeNotAckedPublicKeys.mu.Lock()
|
||||
// defer proc.centralAuth.pki.nodeNotAckedPublicKeys.mu.Unlock()
|
||||
|
||||
fmt.Printf("\n DEBUG DEBUG DEBUG 3: %v \n\n", proc.centralAuth.pki.nodeNotAckedPublicKeys.KeyMap)
|
||||
|
||||
// For all nodes that is not ack'ed we try to send an update once.
|
||||
for n := range proc.centralAuth.pki.nodeNotAckedPublicKeys.KeyMap {
|
||||
fmt.Printf("\n DEBUG DEBUG DEBUG 4: ranging map, working on node %v \n\n", n)
|
||||
msg := Message{
|
||||
ToNode: n,
|
||||
Method: REQKeysDeliverUpdate,
|
||||
|
@ -402,7 +394,6 @@ func (m methodREQKeysAllow) handler(proc process, message Message, node string)
|
|||
|
||||
// For all nodes that is ack'ed we try to send an update once.
|
||||
for n := range proc.centralAuth.pki.nodesAcked.keysAndHash.Keys {
|
||||
fmt.Printf("\n DEBUG DEBUG DEBUG 5: ranging map, working on node %v \n\n", n)
|
||||
msg := Message{
|
||||
ToNode: n,
|
||||
Method: REQKeysDeliverUpdate,
|
||||
|
@ -418,7 +409,7 @@ func (m methodREQKeysAllow) handler(proc process, message Message, node string)
|
|||
|
||||
proc.toRingbufferCh <- []subjectAndMessage{sam}
|
||||
|
||||
fmt.Printf("\n ----> methodREQKeysAllow: SENDING KEYS TO NODE=%v\n", message.FromNode)
|
||||
log.Printf("\n ----> methodREQKeysAllow: sending keys update to node=%v\n", message.FromNode)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Reference in a new issue