Skip to content
Snippets Groups Projects
Commit d8c47b1c authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Add bindings wrapper functions to quickly create bindings objects

parent a7943658
Branches
Tags
2 merge requests!231Revert "Update store to print changes to the partners list",!171RestoreContactsFromBackup
......@@ -579,6 +579,10 @@ func (c *Client) GetInternalClient() api.Client {
return c.api
}
func WrapAPIClient(c *api.Client) *Client {
return &Client{api: *c}
}
// DumpStack returns a string with the stack trace of every running thread.
func DumpStack() (string, error) {
buf := new(bytes.Buffer)
......
......@@ -9,12 +9,13 @@ package bindings
import (
"fmt"
"time"
"github.com/pkg/errors"
"gitlab.com/elixxir/client/ud"
"gitlab.com/elixxir/crypto/contact"
"gitlab.com/elixxir/primitives/fact"
"gitlab.com/xx_network/primitives/id"
"time"
)
// This package wraps the user discovery system
......@@ -338,3 +339,7 @@ func (ud *UserDiscovery) SetAlternativeUserDiscovery(address, cert, contactFile
func (ud *UserDiscovery) UnsetAlternativeUserDiscovery() error {
return ud.ud.UnsetAlternativeUserDiscovery()
}
func WrapUserDiscovery(ud *ud.Manager) *UserDiscovery {
return &UserDiscovery{ud: ud}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment