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
Automate
Agent sessions
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
b3f01709
Commit
b3f01709
authored
Apr 8, 2021
by
Benjamin Wenger
Browse files
Options
Downloads
Patches
Plain Diff
made the bindings not allow multiple calls of login
parent
82c07316
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
bindings/callback.go
+14
-0
14 additions, 0 deletions
bindings/callback.go
bindings/client.go
+5
-0
5 additions, 0 deletions
bindings/client.go
with
19 additions
and
0 deletions
bindings/callback.go
+
14
−
0
View file @
b3f01709
...
@@ -96,3 +96,17 @@ func newRoundListUnregister(rounds []id.Round, ec []*dataStructures.EventCallbac
...
@@ -96,3 +96,17 @@ func newRoundListUnregister(rounds []id.Round, ec []*dataStructures.EventCallbac
type
ClientError
interface
{
type
ClientError
interface
{
Report
(
source
,
message
,
trace
string
)
Report
(
source
,
message
,
trace
string
)
}
}
type
LogWriter
interface
{
Log
(
string
)
}
type
writerAdapter
struct
{
lw
LogWriter
}
func
(
wa
*
writerAdapter
)
Write
(
p
[]
byte
)
(
n
int
,
err
error
){
wa
.
lw
.
Log
(
string
(
p
))
return
len
(
p
),
nil
}
This diff is collapsed.
Click to expand it.
bindings/client.go
+
5
−
0
View file @
b3f01709
...
@@ -137,6 +137,11 @@ func LogLevel(level int) error {
...
@@ -137,6 +137,11 @@ func LogLevel(level int) error {
return
nil
return
nil
}
}
//RegisterLogWriter registers a callback on which logs are written.
func
RegisterLogWriter
(
writer
LogWriter
){
jww
.
SetLogOutput
(
&
writerAdapter
{
lw
:
writer
})
}
//Unmarshals a marshaled contact object, returns an error if it fails
//Unmarshals a marshaled contact object, returns an error if it fails
func
UnmarshalContact
(
b
[]
byte
)
(
*
Contact
,
error
)
{
func
UnmarshalContact
(
b
[]
byte
)
(
*
Contact
,
error
)
{
c
,
err
:=
contact
.
Unmarshal
(
b
)
c
,
err
:=
contact
.
Unmarshal
(
b
)
...
...
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
sign in
to comment