Refactor signer code into command and package
This commit is contained in:
parent
3a2578ae55
commit
38566f35ef
13 changed files with 476 additions and 276 deletions
|
|
@ -2,7 +2,6 @@ package main
|
|||
|
||||
import (
|
||||
"flag"
|
||||
"io"
|
||||
"os"
|
||||
"os/signal"
|
||||
"sync"
|
||||
|
|
@ -45,13 +44,12 @@ func main() {
|
|||
requestChannel := protocol.NewSignerProtocolRequestChannel()
|
||||
responseChannel := make(chan *datastructures.SignerResponse, 1)
|
||||
|
||||
readWriteCloser := (io.ReadWriteCloser)(port)
|
||||
clientProtocolConfig := protocol.NewSignerProtocolConfig()
|
||||
if clientConfig.BufferSize != 0 {
|
||||
clientProtocolConfig.BufferSize = int(clientConfig.BufferSize)
|
||||
}
|
||||
protocolHandler := protocol.NewProtocolHandler(
|
||||
requestChannel, &responseChannel, &readWriteCloser, clientProtocolConfig,
|
||||
requestChannel, &responseChannel, port, clientProtocolConfig,
|
||||
)
|
||||
|
||||
cancelChannel := make(chan os.Signal, 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue