1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2024-12-14 12:37:31 +00:00

updated comments

This commit is contained in:
postmannen 2022-04-20 19:18:16 +02:00
parent 1aca36485a
commit c4f8979f48

View file

@ -1990,6 +1990,10 @@ func (m methodREQPublicKey) handler(proc process, message Message, node string)
outCh := make(chan []byte) outCh := make(chan []byte)
go func() { go func() {
// Normally we would do some logic here, where the result is passed to outCh when done,
// so we can split up the working logic, and f.ex. sending a reply logic.
// In this case this go func and the below select is not needed, but keeping it so the
// structure is the same as the other handlers.
select { select {
case <-ctx.Done(): case <-ctx.Done():
case outCh <- proc.signatures.SignPublicKey: case outCh <- proc.signatures.SignPublicKey:
@ -2040,7 +2044,8 @@ func (m methodREQPublicKeysGet) handler(proc process, message Message, node stri
outCh := make(chan []byte) outCh := make(chan []byte)
go func() { go func() {
// Normally we would do some logic here, where the result is passed to outCh when done. // Normally we would do some logic here, where the result is passed to outCh when done,
// so we can split up the working logic, and f.ex. sending a reply logic.
// In this case this go func and the below select is not needed, but keeping it so the // In this case this go func and the below select is not needed, but keeping it so the
// structure is the same as the other handlers. // structure is the same as the other handlers.
select { select {
@ -2097,7 +2102,8 @@ func (m methodREQPublicKeysToNode) handler(proc process, message Message, node s
outCh := make(chan []byte) outCh := make(chan []byte)
go func() { go func() {
// Normally we would do some logic here, where the result is passed to outCh when done. // Normally we would do some logic here, where the result is passed to outCh when done,
// so we can split up the working logic, and f.ex. sending a reply logic.
// In this case this go func and the below select is not needed, but keeping it so the // In this case this go func and the below select is not needed, but keeping it so the
// structure is the same as the other handlers. // structure is the same as the other handlers.
select { select {
@ -2159,7 +2165,8 @@ func (m methodREQPublicKeysAllow) handler(proc process, message Message, node st
outCh := make(chan []byte) outCh := make(chan []byte)
go func() { go func() {
// Normally we would do some logic here, where the result is passed to outCh when done. // Normally we would do some logic here, where the result is passed to outCh when done,
// so we can split up the working logic, and f.ex. sending a reply logic.
// In this case this go func and the below select is not needed, but keeping it so the // In this case this go func and the below select is not needed, but keeping it so the
// structure is the same as the other handlers. // structure is the same as the other handlers.
select { select {