Documentation ¶
Index ¶
- func StartFileshareManagementLoop() (chan<- FileshareManagementMsg, <-chan interface{})
- type FileshareManagementMsg
- type NordvpnGroupMonitor
- type Server
- func (s *Server) Ping(context.Context, *pb.Empty) (*pb.Empty, error)
- func (s *Server) StartFileshare(context.Context, *pb.Empty) (*pb.Empty, error)
- func (s *Server) Stop(_ context.Context, req *pb.StopNorduserRequest) (*pb.Empty, error)
- func (s *Server) StopFileshare(context.Context, *pb.Empty) (*pb.Empty, error)
- type StartNorduserdMiddleware
- type StopRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartFileshareManagementLoop ¶
func StartFileshareManagementLoop() (chan<- FileshareManagementMsg, <-chan interface{})
StartFileshareManagementLoop starts the management loop in separate goroutine and returns a control channel and a shutdown channel. Management loop will try to disable fileshare and close the shutdown chan when Shutdown message is received.
Types ¶
type FileshareManagementMsg ¶
type FileshareManagementMsg int
const ( Start FileshareManagementMsg = iota Stop Shutdown )
type NordvpnGroupMonitor ¶
type NordvpnGroupMonitor struct {
// contains filtered or unexported fields
}
NordvpnGroupMonitor monitors the nordvpn system group and starts/stops norduserd for users added/removed from the group.
func NewNordvpnGroupMonitor ¶
func NewNordvpnGroupMonitor(service service.NorduserService) NordvpnGroupMonitor
func (*NordvpnGroupMonitor) Start ¶
func (n *NordvpnGroupMonitor) Start() error
Start blocks the thread and starts monitoring for changes in the nordvpn group.
type Server ¶
type Server struct { pb.UnimplementedNorduserServer // contains filtered or unexported fields }
func NewServer ¶
func NewServer(fileshareManagementChan chan<- FileshareManagementMsg, stopChan chan<- StopRequest) *Server
func (*Server) StartFileshare ¶
type StartNorduserdMiddleware ¶
type StartNorduserdMiddleware struct {
// contains filtered or unexported fields
}
StartNorduserdMiddleware provides a way to start/stop norduserd when handling nordvpnd gRPCs.
func NewStartNorduserMiddleware ¶
func NewStartNorduserMiddleware(norduserd service.NorduserService) StartNorduserdMiddleware
func (*StartNorduserdMiddleware) StreamMiddleware ¶
func (n *StartNorduserdMiddleware) StreamMiddleware(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo) error
func (*StartNorduserdMiddleware) UnaryMiddleware ¶
func (n *StartNorduserdMiddleware) UnaryMiddleware( ctx context.Context, req interface{}, info *grpc.UnaryServerInfo) (interface{}, error)
type StopRequest ¶
type StopRequest struct {
DisableAutostart bool
}
Click to show internal directories.
Click to hide internal directories.