mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-16 04:24:56 +02:00
app/ship_processor.go: make SpawnProccessor() take in a message.Codec
This commit is contained in:
parent
3e8712c0c0
commit
f8f1d0399f
1 changed files with 2 additions and 3 deletions
|
|
@ -2,7 +2,6 @@ package app
|
|||
|
||||
import (
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/eosswedenorg/thalos/api"
|
||||
"github.com/eosswedenorg/thalos/api/message"
|
||||
|
|
@ -34,12 +33,12 @@ type ShipProcessor struct {
|
|||
encode message.Encoder
|
||||
}
|
||||
|
||||
func SpawnProccessor(shipStream *shipclient.Stream, writer api.Writer, abi *abi.AbiManager) *ShipProcessor {
|
||||
func SpawnProccessor(shipStream *shipclient.Stream, writer api.Writer, abi *abi.AbiManager, codec message.Codec) *ShipProcessor {
|
||||
processor := &ShipProcessor{
|
||||
abi: abi,
|
||||
writer: writer,
|
||||
shipStream: shipStream,
|
||||
encode: logDecoratedEncoder(json.Marshal),
|
||||
encode: logDecoratedEncoder(codec.Encoder),
|
||||
}
|
||||
|
||||
// Attach handlers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue