Files
netbird/client/ui/services/conn.go
T
Theodor Midtlien e13dbe8cb4 [client] Improve error surfacing for restricted daemon sockets (#7704)
* Add probe for daemon restriction and improve error surfacing
2026-10-23 11:38:26 +02:00

24 lines
574 B
Go

//go:build !android && !ios && !freebsd && !js
package services
import (
"context"
"github.com/netbirdio/netbird/client/proto"
)
// DaemonConn returns a lazy gRPC client to the NetBird daemon.
// All services receive a DaemonConn so they share a single connection.
type DaemonConn interface {
Client() (proto.DaemonServiceClient, error)
}
// AccessProber is implemented by a DaemonConn that can probe whether the daemon
// socket refuses this user.
type AccessProber interface {
DeniesCaller(ctx context.Context) bool
}
func ptrStr(s string) *string { return &s }