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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
6f751a67
Commit
6f751a67
authored
Jan 8, 2020
by
Benjamin Wenger
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix-bindings-2020jan8' into 'release'
remove interface from bindings See merge request
!311
parents
724d3fc1
f074bf48
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
bindings/client_test.go
+1
-1
1 addition, 1 deletion
bindings/client_test.go
bindings/interfaces.go
+4
-2
4 additions, 2 deletions
bindings/interfaces.go
with
5 additions
and
3 deletions
bindings/client_test.go
+
1
−
1
View file @
6f751a67
...
@@ -402,7 +402,7 @@ func TestLoginLogout(t *testing.T) {
...
@@ -402,7 +402,7 @@ func TestLoginLogout(t *testing.T) {
type
MockListener
bool
type
MockListener
bool
func
(
m
*
MockListener
)
Hear
(
msg
Message
,
isHeardElsewhere
bool
,
i
...
interface
{}
)
{
func
(
m
*
MockListener
)
Hear
(
msg
Message
,
isHeardElsewhere
bool
)
{
*
m
=
true
*
m
=
true
}
}
...
...
This diff is collapsed.
Click to expand it.
bindings/interfaces.go
+
4
−
2
View file @
6f751a67
...
@@ -60,7 +60,9 @@ type storageProxy struct {
...
@@ -60,7 +60,9 @@ type storageProxy struct {
// gets a message of the type that the registerer specified at registration
// gets a message of the type that the registerer specified at registration
// time.
// time.
type
Listener
interface
{
type
Listener
interface
{
Hear
(
msg
Message
,
isHeardElsewhere
bool
,
i
...
interface
{})
// This does not include the generic interfaces seen in the go implementation
// Those are used internally on the backend and cause errors if we try to port them
Hear
(
msg
Message
,
isHeardElsewhere
bool
)
}
}
// Translate a bindings listener to a switchboard listener
// Translate a bindings listener to a switchboard listener
...
@@ -72,7 +74,7 @@ type listenerProxy struct {
...
@@ -72,7 +74,7 @@ type listenerProxy struct {
func
(
lp
*
listenerProxy
)
Hear
(
msg
switchboard
.
Item
,
isHeardElsewhere
bool
,
i
...
interface
{})
{
func
(
lp
*
listenerProxy
)
Hear
(
msg
switchboard
.
Item
,
isHeardElsewhere
bool
,
i
...
interface
{})
{
msgInterface
:=
&
parse
.
BindingsMessageProxy
{
Proxy
:
msg
.
(
*
parse
.
Message
)}
msgInterface
:=
&
parse
.
BindingsMessageProxy
{
Proxy
:
msg
.
(
*
parse
.
Message
)}
lp
.
proxy
.
Hear
(
msgInterface
,
isHeardElsewhere
,
i
)
lp
.
proxy
.
Hear
(
msgInterface
,
isHeardElsewhere
)
}
}
// Interface used to receive a callback on searching for a user
// Interface used to receive a callback on searching for a user
...
...
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