diff options
Diffstat (limited to 'internal/run.go')
| -rw-r--r-- | internal/run.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/run.go b/internal/run.go index 4165f50..8b7faa9 100644 --- a/internal/run.go +++ b/internal/run.go @@ -2,7 +2,6 @@ package internal import ( "context" - "log" ) func Run(ctx context.Context, configFile string) { @@ -12,19 +11,20 @@ func Run(ctx context.Context, configFile string) { } ch := make(chan vote) + quorum := make(quorumMap) go func() { for { select { case vote := <-ch: - log.Println(vote) + quorum.vote(vote) case <-ctx.Done(): return } } }() - if err := startTcpServer(ctx, config.Address, ch); err != nil { + if err := startTcpServer(ctx, config, ch); err != nil { panic(err) } } |
