ipn, ipn/ipnserver: add support for serving in error-message-only mode

So Windows service failures can be propagated to the Windows UI client.
This commit is contained in:
Brad Fitzpatrick
2020-07-08 14:15:33 -07:00
parent 5280d039c4
commit 3984f9be2f
2 changed files with 39 additions and 5 deletions

View File

@@ -80,6 +80,10 @@ func (bs *BackendServer) send(n Notify) {
bs.sendNotifyMsg(b)
}
func (bs *BackendServer) SendErrorMessage(msg string) {
bs.send(Notify{ErrMessage: &msg})
}
// GotCommandMsg parses the incoming message b as a JSON Command and
// calls GotCommand with it.
func (bs *BackendServer) GotCommandMsg(b []byte) error {