Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
7c7bb948
Commit
7c7bb948
authored
3 years ago
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Add String method to processors
parent
ceadb4af
No related branches found
No related tags found
3 merge requests
!510
Release
,
!207
WIP: Client Restructure
,
!203
Symmetric broadcast
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
single/listener.go
+7
-0
7 additions, 0 deletions
single/listener.go
single/requestPartProcessor.go
+6
-0
6 additions, 0 deletions
single/requestPartProcessor.go
single/responseProcessor.go
+7
-0
7 additions, 0 deletions
single/responseProcessor.go
ud/utils_test.go
+4
-0
4 additions, 0 deletions
ud/utils_test.go
with
24 additions
and
0 deletions
single/listener.go
+
7
−
0
View file @
7c7bb948
...
@@ -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
[
:
],
...
...
This diff is collapsed.
Click to expand it.
single/requestPartProcessor.go
+
6
−
0
View file @
7c7bb948
...
@@ -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
}
This diff is collapsed.
Click to expand it.
single/responseProcessor.go
+
7
−
0
View file @
7c7bb948
...
@@ -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
}
This diff is collapsed.
Click to expand it.
ud/utils_test.go
+
4
−
0
View file @
7c7bb948
...
@@ -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
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment