summaryrefslogtreecommitdiff
path: root/internal/client/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/client/client.go')
-rw-r--r--internal/client/client.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/internal/client/client.go b/internal/client/client.go
index f7ddb12..91d64e2 100644
--- a/internal/client/client.go
+++ b/internal/client/client.go
@@ -8,10 +8,8 @@ import (
"codeberg.org/snonux/gorum/internal/config"
)
-const packageStr = "client"
-
func Start(ctx context.Context, conf config.Config, liveNodesCh <-chan []string) {
- log.Println(packageStr, "starting")
+ log.Println("client: starting")
fanOut := make([]chan []string, len(conf.Nodes))
for i, node := range conf.Nodes {
@@ -28,7 +26,7 @@ func Start(ctx context.Context, conf config.Config, liveNodesCh <-chan []string)
for {
select {
case liveNodes := <-liveNodesCh:
- log.Printf("Notifying live nodes %v to all partner nodes", liveNodes)
+ log.Printf("client: notifying live nodes %v to all partner nodes", liveNodes)
for _, ch := range fanOut {
// First, clear previous element of the channel, if any
select {
@@ -50,9 +48,9 @@ func startConnection(ctx context.Context, node string) chan []string {
go func() {
for {
- log.Println(packageStr, "starting connection", node)
+ log.Println("client: starting connection", node)
if err := tcpClientRun(ctx, node, ch); err != nil {
- log.Println(packageStr, "not connected to node", node, "anymore:", err)
+ log.Println("client: not connected to node", node, "anymore:", err)
}
select {