api

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package api implements the HTTP management API for glass-agent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server serves the glass-agent HTTP management API.

func NewServer

func NewServer(addr string, supervisor Supervisor, system System, glassBin, dataDir string, log *logger.Logger) *Server

NewServer returns a new Server.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves an HTTP request.

type Supervisor

type Supervisor interface {
	Restart()
	Info() proc.Info
	Lines() []string
	Follow(ctx context.Context) <-chan string
}

Supervisor is the interface the Server uses to control the glass process.

type System

type System interface {
	Logind() dbus.Logind
	RAUC() dbus.RAUC
}

System is the interface the Server uses to control system services via D-Bus.

Jump to

Keyboard shortcuts

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