-
Notifications
You must be signed in to change notification settings - Fork 1
Add OnConnectionChangeFunc callback to BroflakeOptions #330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c573620
e96174b
b35aefc
cab1914
f18fe9e
29aa1c9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,8 @@ import ( | |
|
|
||
| type UIImpl struct { | ||
| UI | ||
| BroflakeEngine *BroflakeEngine | ||
| BroflakeEngine *BroflakeEngine | ||
| OnConnectionChangeFunc ConnectionChangeFunc | ||
|
||
| } | ||
|
|
||
| func (ui *UIImpl) Init(bf *BroflakeEngine) { | ||
|
|
@@ -45,5 +46,7 @@ func (ui UIImpl) OnDownstreamThroughput(bytesPerSec int) { | |
| } | ||
|
|
||
| func (ui UIImpl) OnConsumerConnectionChange(state int, workerIdx int, addr net.IP) { | ||
| // TODO: do something? | ||
| if ui.OnConnectionChangeFunc != nil { | ||
| ui.OnConnectionChangeFunc(state, workerIdx, addr) | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.