rest

package
v1.0.24 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package rest provides the REST API server for AgentManager.

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 is the REST API server.

func NewServer

func NewServer(
	cfg *config.Config,
	plat platform.Platform,
	store storage.Store,
	det *detector.Detector,
	cat *catalog.Manager,
	inst *installer.Manager,
) *Server

NewServer creates a new REST server.

func (*Server) Address

func (s *Server) Address() string

Address returns the server's listening address.

func (*Server) Start

func (s *Server) Start(ctx context.Context, cfg ServerConfig) error

Start starts the REST server.

func (*Server) Stop

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

Stop gracefully stops the REST server.

type ServerConfig

type ServerConfig struct {
	Address  string
	TLS      bool
	CertFile string
	KeyFile  string
	APIKey   string // Optional API key for authentication
}

ServerConfig configures the REST server.

Jump to

Keyboard shortcuts

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