mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-26 20:26:39 +00:00
Merge remote-tracking branch 'origin/main' into braginini/wasm
# Conflicts: # signal/client/client.go
This commit is contained in:
@@ -10,6 +10,12 @@ import (
|
||||
|
||||
// A set of tools to exchange connection details (Wireguard endpoints) with the remote peer.
|
||||
|
||||
// Status is the status of the client
|
||||
type Status string
|
||||
|
||||
const StreamConnected Status = "Connected"
|
||||
const StreamDisconnected Status = "Disconnected"
|
||||
|
||||
// Client is an interface describing Signal client
|
||||
type Client interface {
|
||||
// Receive handles incoming messages from the Signal service
|
||||
@@ -21,6 +27,7 @@ type Client interface {
|
||||
SendToStream(msg *proto.EncryptedMessage) error
|
||||
// WaitStreamConnected blocks until client is connected to the Signal stream
|
||||
WaitStreamConnected()
|
||||
GetStatus() Status
|
||||
}
|
||||
|
||||
// decryptMessage decrypts the body of the msg using Wireguard private key and Remote peer's public key
|
||||
|
||||
@@ -37,7 +37,7 @@ var _ = Describe("Client", func() {
|
||||
})
|
||||
|
||||
Describe("Exchanging messages", func() {
|
||||
Context("between streamConnected peers", func() {
|
||||
Context("between connected peers", func() {
|
||||
It("should be successful", func() {
|
||||
|
||||
var msgReceived sync.WaitGroup
|
||||
|
||||
Reference in New Issue
Block a user