remote_access_server

package
v1.4.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 47 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConsoleHandler

type AppConsoleHandler struct {
	// contains filtered or unexported fields
}

AppConsoleHandler handles WebSocket connections for application-level console sessions.

func NewAppConsoleHandler

func NewAppConsoleHandler(log logrus.FieldLogger, mgr *console.AppConsoleSessionManager) *AppConsoleHandler

NewAppConsoleHandler returns an AppConsoleHandler that upgrades HTTP connections to WebSocket and bridges them to AppConsoleSessions.

func (*AppConsoleHandler) HandleApplicationConsole

func (h *AppConsoleHandler) HandleApplicationConsole(w http.ResponseWriter, r *http.Request)

HandleApplicationConsole upgrades the HTTP connection to WebSocket and bridges it bidirectionally to the AppConsoleSession for the given device and application.

func (*AppConsoleHandler) RegisterRoutes

func (h *AppConsoleHandler) RegisterRoutes(r chi.Router)

RegisterRoutes mounts the application console WebSocket endpoint.

type Server

type Server struct {
	pb.UnimplementedRouterServiceServer
	// contains filtered or unexported fields
}

Server provides the flightctl-remote-access service: a WebSocket HTTP server and a gRPC RouterService that bridges agent streams to active AppConsoleSessions.

func New

func New(
	log logrus.FieldLogger,
	cfg *config.Config,
	caBundleCerts []*x509.Certificate,
	serverCerts *crypto.TLSCertificateConfig,
	db *gorm.DB,
	notifier console.ConsoleEventNotifier,
) (*Server, error)

New returns a new Server. All initialisation requiring a context (listeners, auth, router) is deferred to Run(), matching the imagebuilder-api pattern.

func (*Server) CloseSession

func (s *Server) CloseSession(session *console.AppConsoleSession) error

CloseSession removes a previously registered AppConsoleSession.

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run initialises all runtime components (listeners, auth, router, gRPC) and blocks until ctx is cancelled or a listener exits unexpectedly.

func (*Server) StartSession

func (s *Server) StartSession(session *console.AppConsoleSession) error

StartSession registers an AppConsoleSession so the next gRPC Stream() call from the agent can rendezvous with it.

func (*Server) Stream

func (s *Server) Stream(stream pb.RouterService_StreamServer) error

Stream implements pb.RouterServiceServer. When the agent connects it reads the x-session-id gRPC metadata key, looks up the matching AppConsoleSession, sends the selected protocol to ProtocolCh, and forwards bytes bidirectionally.

Jump to

Keyboard shortcuts

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