Skip to content
Snippets Groups Projects
Commit 7c7bb948 authored by Josh Brooks's avatar Josh Brooks
Browse files

Add String method to processors

parent ceadb4af
No related branches found
No related tags found
3 merge requests!510Release,!207WIP: Client Restructure,!203Symmetric broadcast
...@@ -13,6 +13,8 @@ import ( ...@@ -13,6 +13,8 @@ import (
"gitlab.com/xx_network/primitives/id" "gitlab.com/xx_network/primitives/id"
) )
const listenerProcessorName = "listenerProcessorName"
type Receiver interface { type Receiver interface {
Callback(*Request, receptionID.EphemeralIdentity, []rounds.Round) Callback(*Request, receptionID.EphemeralIdentity, []rounds.Round)
} }
...@@ -145,6 +147,11 @@ func (l *listener) Process(ecrMsg format.Message, ...@@ -145,6 +147,11 @@ func (l *listener) Process(ecrMsg format.Message,
} }
} }
func (l *listener) String() string {
return listenerProcessorName
}
func (l *listener) Stop() { func (l *listener) Stop() {
svc := cmixMsg.Service{ svc := cmixMsg.Service{
Identifier: l.myId[:], Identifier: l.myId[:],
......
...@@ -16,6 +16,8 @@ import ( ...@@ -16,6 +16,8 @@ import (
"gitlab.com/xx_network/primitives/id" "gitlab.com/xx_network/primitives/id"
) )
const requestPartProcessorName = "requestPartProcessor"
// requestPartProcessor handles the decryption and collation of request parts. // requestPartProcessor handles the decryption and collation of request parts.
type requestPartProcessor struct { type requestPartProcessor struct {
myId *id.ID myId *id.ID
...@@ -56,3 +58,7 @@ func (rpp *requestPartProcessor) Process(msg format.Message, ...@@ -56,3 +58,7 @@ func (rpp *requestPartProcessor) Process(msg format.Message,
rpp.cb(payload, rpp.roundIDs.getList()) rpp.cb(payload, rpp.roundIDs.getList())
} }
} }
func (rpp *requestPartProcessor) String() string {
return requestPartProcessorName
}
...@@ -9,6 +9,8 @@ import ( ...@@ -9,6 +9,8 @@ import (
"gitlab.com/elixxir/primitives/format" "gitlab.com/elixxir/primitives/format"
) )
const responseProcessorName = "responseProcessorName"
type callbackWrapper func(payload []byte, type callbackWrapper func(payload []byte,
receptionID receptionID.EphemeralIdentity, rounds []rounds.Round, err error) receptionID receptionID.EphemeralIdentity, rounds []rounds.Round, err error)
...@@ -58,3 +60,8 @@ func (rsp *responseProcessor) Process(ecrMsg format.Message, ...@@ -58,3 +60,8 @@ func (rsp *responseProcessor) Process(ecrMsg format.Message,
rsp.callback(payload, receptionID, rsp.roundIDs.getList(), nil) rsp.callback(payload, receptionID, rsp.roundIDs.getList(), nil)
} }
} }
func (rsp *responseProcessor) String() string {
return responseProcessorName
}
...@@ -313,6 +313,10 @@ func (tnm *testNetworkManager) Process(ecrMsg format.Message, ...@@ -313,6 +313,10 @@ func (tnm *testNetworkManager) Process(ecrMsg format.Message,
} }
func (tnm *testNetworkManager) String() string {
return "mockPRocessor"
}
func (tnm *testNetworkManager) DeleteService(clientID *id.ID, toDelete message.Service, processor message.Processor) { func (tnm *testNetworkManager) DeleteService(clientID *id.ID, toDelete message.Service, processor message.Processor) {
return return
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment