mirror of
https://github.com/netbirdio/netbird.git
synced 2025-01-14 18:08:29 +01:00
45a6263adc
Add new feature to notify the user when new client route has arrived. Refactor the initial route handling. I move every route logic into the route manager package. * Add notification management for client rules * Export the route notification for Android * Compare the notification based on network range instead of id.
20 lines
675 B
Go
20 lines
675 B
Go
package client
|
|
|
|
import (
|
|
"io"
|
|
|
|
"github.com/netbirdio/netbird/client/system"
|
|
"github.com/netbirdio/netbird/management/proto"
|
|
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
|
)
|
|
|
|
type Client interface {
|
|
io.Closer
|
|
Sync(msgHandler func(msg *proto.SyncResponse) error) error
|
|
GetServerPublicKey() (*wgtypes.Key, error)
|
|
Register(serverKey wgtypes.Key, setupKey string, jwtToken string, sysInfo *system.Info, sshKey []byte) (*proto.LoginResponse, error)
|
|
Login(serverKey wgtypes.Key, sysInfo *system.Info, sshKey []byte) (*proto.LoginResponse, error)
|
|
GetDeviceAuthorizationFlow(serverKey wgtypes.Key) (*proto.DeviceAuthorizationFlow, error)
|
|
GetRoutes() ([]*proto.Route, error)
|
|
}
|