web

package
v0.4.1-beta.8 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package web provides the HTTP server and multiplexer for the daemon's web API. It wires together core handlers (deployment, service, proxy, log streaming, system) and manages all external HTTP endpoints exposed by the daemon. Concrete HTTP routing and server lifecycle logic are contained in this package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeploymentHandler

type DeploymentHandler interface {
	ListDeployments(w http.ResponseWriter, r *http.Request)
	CreateDeployment(w http.ResponseWriter, r *http.Request)
}

type LogStreamHandler

type LogStreamHandler interface {
	OpenLogStream(w http.ResponseWriter, r *http.Request)
}

type ProxyHandler

type ProxyHandler interface {
	GetStatus(w http.ResponseWriter, r *http.Request)
	HandleRestart(w http.ResponseWriter, r *http.Request)
	HandleAdd(w http.ResponseWriter, r *http.Request)
	HandleRemove(w http.ResponseWriter, r *http.Request)
}

type ServiceHandler

type ServiceHandler interface {
	GetService(w http.ResponseWriter, r *http.Request)
	ListServices(w http.ResponseWriter, r *http.Request)
	UpdateService(w http.ResponseWriter, r *http.Request)
}

type SystemHandler

type SystemHandler interface {
	GetInfo(w http.ResponseWriter, r *http.Request)
	SystemStatus(w http.ResponseWriter, r *http.Request)
	RunDoctor(w http.ResponseWriter, r *http.Request)
	Install(w http.ResponseWriter, r *http.Request)
	RegisterInstance(w http.ResponseWriter, r *http.Request)
	RequestDomain(w http.ResponseWriter, r *http.Request)
	Tasks(w http.ResponseWriter, r *http.Request)
	GetMode(w http.ResponseWriter, r *http.Request)
	SetMode(w http.ResponseWriter, r *http.Request)
	UpdateBootstrapToken(w http.ResponseWriter, r *http.Request)
	Registered(w http.ResponseWriter, r *http.Request)
}

type WebHandler

type WebHandler struct {
	DepsH   DeploymentHandler
	SvcH    ServiceHandler
	LogsH   LogStreamHandler
	ProxyH  ProxyHandler
	SystemH SystemHandler
	AuthM   *auth.Middleware
}

func (*WebHandler) BuildMux

func (w *WebHandler) BuildMux(cfg *shared.Config) *http.ServeMux

BuildMux creates and returns the configured HTTP multiplexer.

func (*WebHandler) NewServer

func (w *WebHandler) NewServer(cfg *shared.Config) error

NewServer starts the HTTP server.

Jump to

Keyboard shortcuts

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