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
c49e3c05
Commit
c49e3c05
authored
4 years ago
by
Jake Taylor
Browse files
Options
Downloads
Patches
Plain Diff
added comments
parent
383a2c66
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
api/client.go
+1
-0
1 addition, 0 deletions
api/client.go
bindings/client.go
+4
-4
4 additions, 4 deletions
bindings/client.go
network/follow.go
+6
-0
6 additions, 0 deletions
network/follow.go
with
11 additions
and
4 deletions
api/client.go
+
1
−
0
View file @
c49e3c05
...
@@ -339,6 +339,7 @@ func (c *Client) GetSwitchboard() interfaces.Switchboard {
...
@@ -339,6 +339,7 @@ func (c *Client) GetSwitchboard() interfaces.Switchboard {
// events.
// events.
func
(
c
*
Client
)
GetRoundEvents
()
interfaces
.
RoundEvents
{
func
(
c
*
Client
)
GetRoundEvents
()
interfaces
.
RoundEvents
{
jww
.
INFO
.
Printf
(
"GetRoundEvents()"
)
jww
.
INFO
.
Printf
(
"GetRoundEvents()"
)
jww
.
WARN
.
Printf
(
"GetRoundEvents does not handle Client Errors edge case!"
)
return
c
.
network
.
GetInstance
()
.
GetRoundEvents
()
return
c
.
network
.
GetInstance
()
.
GetRoundEvents
()
}
}
...
...
This diff is collapsed.
Click to expand it.
bindings/client.go
+
4
−
4
View file @
c49e3c05
...
@@ -291,15 +291,15 @@ func (c *Client) RegisterRoundEventsHandler(rid int, cb RoundEventCallback,
...
@@ -291,15 +291,15 @@ func (c *Client) RegisterRoundEventsHandler(rid int, cb RoundEventCallback,
}
}
// RegisterMessageDeliveryCB allows the caller to get notified if the rounds a
// RegisterMessageDeliveryCB allows the caller to get notified if the rounds a
// message was sent in suc
e
sfully completed. Under the hood, this uses the same
// message was sent in suc
ces
sfully completed. Under the hood, this uses the same
// interface as RegisterRoundEventsHandler, but provides a conv
i
en
e
t way to use
// interface as RegisterRoundEventsHandler, but provides a convent way to use
// the interface in its most common form, looking up the result of message
// the interface in its most common form, looking up the result of message
// retreval
// retr
i
eval
//
//
// The callbacks will return at timeoutMS if no state update occurs
// The callbacks will return at timeoutMS if no state update occurs
//
//
// This function takes the marshaled send report to ensure a memory leak does
// This function takes the marshaled send report to ensure a memory leak does
// not occur as a result of both sides of the bindings holding a refrence to
// not occur as a result of both sides of the bindings holding a ref
e
rence to
// the same pointer.
// the same pointer.
func
(
c
*
Client
)
RegisterMessageDeliveryCB
(
marshaledSendReport
[]
byte
,
func
(
c
*
Client
)
RegisterMessageDeliveryCB
(
marshaledSendReport
[]
byte
,
mdc
MessageDeliveryCallback
,
timeoutMS
int
)
(
*
Unregister
,
error
)
{
mdc
MessageDeliveryCallback
,
timeoutMS
int
)
(
*
Unregister
,
error
)
{
...
...
This diff is collapsed.
Click to expand it.
network/follow.go
+
6
−
0
View file @
c49e3c05
...
@@ -173,6 +173,12 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) {
...
@@ -173,6 +173,12 @@ func (m *manager) follow(rng csprng.Source, comms followNetworkComms) {
return
return
}
}
// FIXME: Should be able to trigger proper type of round event
// FIXME: without mutating the RoundInfo. Signature also needs verified
// FIXME: before keys are deleted
update
.
State
=
uint32
(
states
.
FAILED
)
m
.
Instance
.
GetRoundEvents
()
.
TriggerRoundEvent
(
update
)
// Delete all existing keys and trigger a re-registration with the relevant Node
// Delete all existing keys and trigger a re-registration with the relevant Node
m
.
Session
.
Cmix
()
.
Remove
(
nid
)
m
.
Session
.
Cmix
()
.
Remove
(
nid
)
m
.
Instance
.
GetAddGatewayChan
()
<-
nGw
m
.
Instance
.
GetAddGatewayChan
()
<-
nGw
...
...
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