server

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: BSD-3-Clause Imports: 31 Imported by: 0

Documentation

Overview

Package server implements the condatainer dashboard HTTP server. It runs on the login node, provides a web dashboard, reverse-proxies to helper services on compute nodes via SSH tunnels, and streams SSE logs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAlive

func IsAlive(pidFile string) bool

IsAlive returns true if the server described by the PID file is running.

func ReadState

func ReadState(pidFile string) (*config.ServerState, error)

ReadState reads and parses the server State from the PID file.

func RunDaemon

func RunDaemon(port int, reportPipe *os.File, watchPID int) error

RunDaemon starts the HTTP server, writes the PID file, signals readiness via reportPipe (if non-nil), then blocks until SIGTERM/SIGINT. If watchPID > 0, the server also exits when that process dies (used in non-daemon mode to tie the server lifetime to the parent shell).

Types

type SSEBroker

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

SSEBroker fan-outs SSE messages to subscribed HTTP clients. One broker per helper ID; the watcher pushes messages into it.

func (*SSEBroker) ServeSSE

func (b *SSEBroker) ServeSSE(w http.ResponseWriter, r *http.Request)

ServeSSE writes SSE events to the client until r.Context() is done.

Jump to

Keyboard shortcuts

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