Documentation ¶
Index ¶
- Constants
- type Controller
- func (c *Controller) CloseAllPeerUpdateChannels()
- func (c *Controller) DeletePeer(peerID uint32) error
- func (c *Controller) DeletePeerUpdateChannel(id uint32)
- func (c *Controller) GetConnectedPeers(id uint32) (*ctrlv1.PeerList, error)
- func (c *Controller) GetPeerUpdateChannel(id uint32) chan *ctrlv1.UpdateResponse
- func (c *Controller) LogoutPeer(peer *types.Peer) error
- func (c *Controller) PeerConnectedEvent(id uint32)
- func (c *Controller) PeerDisconnectedEvent(id uint32)
- func (c *Controller) PeerForcedLogoutEvent(id uint32)
- func (c *Controller) ProcessPeerLogin(peer *types.Peer, req *ctrlv1.LoginPeerRequest) error
- func (c *Controller) RegisterPeer(req *ctrlv1.LoginPeerRequest, userID string) (*types.Peer, error)
- type GRPCServer
- func (s *GRPCServer) DeletePeer(ctx context.Context, req *ctrlv1.DeletePeerRequest) (*ctrlv1.DeletePeerResponse, error)
- func (s *GRPCServer) GetPKCEAuthInfo(ctx context.Context, req *ctrlv1.GetPKCEAuthInfoRequest) (*ctrlv1.GetPKCEAuthInfoResponse, error)
- func (s *GRPCServer) GetPeer(ctx context.Context, req *ctrlv1.GetPeerRequest) (*ctrlv1.GetPeerResponse, error)
- func (s *GRPCServer) GetPeers(ctx context.Context, req *ctrlv1.GetPeersRequest) (*ctrlv1.GetPeersResponse, error)
- func (s *GRPCServer) LoginPeer(ctx context.Context, req *ctrlv1.LoginPeerRequest) (*ctrlv1.LoginPeerResponse, error)
- func (s *GRPCServer) UpdateStream(stream ctrlv1.ControllerService_UpdateStreamServer) error
Constants ¶
View Source
const MachineIDLen = 64
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController( db *db.Store, prefix netip.Prefix, ) *Controller
func (*Controller) CloseAllPeerUpdateChannels ¶
func (c *Controller) CloseAllPeerUpdateChannels()
func (*Controller) DeletePeer ¶
func (c *Controller) DeletePeer(peerID uint32) error
func (*Controller) DeletePeerUpdateChannel ¶
func (c *Controller) DeletePeerUpdateChannel(id uint32)
func (*Controller) GetConnectedPeers ¶
func (c *Controller) GetConnectedPeers(id uint32) (*ctrlv1.PeerList, error)
func (*Controller) GetPeerUpdateChannel ¶
func (c *Controller) GetPeerUpdateChannel(id uint32) chan *ctrlv1.UpdateResponse
func (*Controller) LogoutPeer ¶
func (c *Controller) LogoutPeer(peer *types.Peer) error
func (*Controller) PeerConnectedEvent ¶
func (c *Controller) PeerConnectedEvent(id uint32)
func (*Controller) PeerDisconnectedEvent ¶
func (c *Controller) PeerDisconnectedEvent(id uint32)
func (*Controller) PeerForcedLogoutEvent ¶
func (c *Controller) PeerForcedLogoutEvent(id uint32)
func (*Controller) ProcessPeerLogin ¶
func (c *Controller) ProcessPeerLogin(peer *types.Peer, req *ctrlv1.LoginPeerRequest) error
func (*Controller) RegisterPeer ¶
func (c *Controller) RegisterPeer( req *ctrlv1.LoginPeerRequest, userID string, ) (*types.Peer, error)
type GRPCServer ¶
type GRPCServer struct { ctrlv1.UnimplementedControllerServiceServer // contains filtered or unexported fields }
func NewGRPCServer ¶
func NewGRPCServer(controller *Controller, validator *auth.TokenValidator, enableAuth bool) *GRPCServer
func (*GRPCServer) DeletePeer ¶
func (s *GRPCServer) DeletePeer( ctx context.Context, req *ctrlv1.DeletePeerRequest, ) (*ctrlv1.DeletePeerResponse, error)
func (*GRPCServer) GetPKCEAuthInfo ¶
func (s *GRPCServer) GetPKCEAuthInfo( ctx context.Context, req *ctrlv1.GetPKCEAuthInfoRequest, ) (*ctrlv1.GetPKCEAuthInfoResponse, error)
func (*GRPCServer) GetPeer ¶
func (s *GRPCServer) GetPeer(ctx context.Context, req *ctrlv1.GetPeerRequest) (*ctrlv1.GetPeerResponse, error)
////////////////////////////// GRPC Gateway API Methods ////////////////////////////// TODO Should check if user is admin otherwise only return peers user has registered Part of plan to add scopes/permissions
func (*GRPCServer) GetPeers ¶
func (s *GRPCServer) GetPeers( ctx context.Context, req *ctrlv1.GetPeersRequest, ) (*ctrlv1.GetPeersResponse, error)
func (*GRPCServer) LoginPeer ¶
func (s *GRPCServer) LoginPeer( ctx context.Context, req *ctrlv1.LoginPeerRequest, ) (*ctrlv1.LoginPeerResponse, error)
func (*GRPCServer) UpdateStream ¶
func (s *GRPCServer) UpdateStream(stream ctrlv1.ControllerService_UpdateStreamServer) error
Click to show internal directories.
Click to hide internal directories.