controller

package
v0.0.0-...-8bb18f9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2024 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

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 (*GRPCServer) GetPKCEAuthInfo

func (*GRPCServer) GetPeer

////////////////////////////// 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 (*GRPCServer) LoginPeer

func (*GRPCServer) UpdateStream

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL