5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-01-11 10:45:42 +00:00
yggdrasil-go/src/admin/removepeer.go
ehmry 7db934488e
Reimplement AddPeer and RemovePeer for admin socket ()
* Reimplement AddPeer and RemovePeer for admin socket

Fix 

* Disconnect the peer on `removePeer`

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-10-02 12:35:43 +01:00

13 lines
299 B
Go

package admin
type RemovePeerRequest struct {
Uri string `json:"uri"`
Sintf string `json:"interface,omitempty"`
}
type RemovePeerResponse struct{}
func (a *AdminSocket) removePeerHandler(req *RemovePeerRequest, res *RemovePeerResponse) error {
return a.core.RemovePeer(req.Uri, req.Sintf)
}