server

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: BSD-3-Clause Imports: 36 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

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. finished/finalMsg cache the terminal "done" event (see publishFinal) so a client that connects after the task finished still gets the result.

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, or immediately writes the cached final event and returns if the task had already finished before this client connected.

Jump to

Keyboard shortcuts

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