httpserver

package
v0.0.0-...-fcb405d Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// API Path constants
	APIPathHealth               = "/health"
	APIPathVersion              = "/version"
	APIPathModelConfig          = "/api/modelconfigs"
	APIPathRuns                 = "/api/runs"
	APIPathSessions             = "/api/sessions"
	APIPathTasks                = "/api/tasks"
	APIPathTools                = "/api/tools"
	APIPathToolServers          = "/api/toolservers"
	APIPathToolServerTypes      = "/api/toolservertypes"
	APIPathAgents               = "/api/agents"
	APIPathModelProviderConfigs = "/api/modelproviderconfigs"
	APIPathModels               = "/api/models"
	APIPathMemories             = "/api/memories"
	APIPathNamespaces           = "/api/namespaces"
	APIPathA2A                  = "/api/a2a"
	APIPathMCP                  = "/mcp"
	APIPathFeedback             = "/api/feedback"
	APIPathLangGraph            = "/api/langgraph"
	APIPathCrewAI               = "/api/crewai"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPServer

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

HTTPServer is the structure that manages the HTTP server

func NewHTTPServer

func NewHTTPServer(config ServerConfig) (*HTTPServer, error)

NewHTTPServer creates a new HTTP server instance

func (*HTTPServer) NeedLeaderElection

func (s *HTTPServer) NeedLeaderElection() bool

NeedLeaderElection implements controller-runtime's LeaderElectionRunnable interface

func (*HTTPServer) Start

func (s *HTTPServer) Start(ctx context.Context) error

Start initializes and starts the HTTP server

func (*HTTPServer) Stop

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

Stop stops the HTTP server

type MemoryCleanupRunnable

type MemoryCleanupRunnable struct {
	DbClient dbpkg.Client
	Interval time.Duration
}

MemoryCleanupRunnable is a controller-runtime Runnable that periodically prunes expired memory entries. It implements NeedLeaderElection so that the sweep only runs on the elected leader, preventing duplicate deletes when multiple replicas are deployed.

func NewMemoryCleanupRunnable

func NewMemoryCleanupRunnable(dbClient dbpkg.Client, interval time.Duration) *MemoryCleanupRunnable

NewMemoryCleanupRunnable returns a MemoryCleanupRunnable with the given database client. interval controls how often the cleanup runs; pass 0 to use the default of 24 hours.

func (*MemoryCleanupRunnable) NeedLeaderElection

func (m *MemoryCleanupRunnable) NeedLeaderElection() bool

func (*MemoryCleanupRunnable) Start

Start runs the periodic cleanup loop until ctx is cancelled.

type ServerConfig

type ServerConfig struct {
	Router            *mux.Router
	BindAddr          string
	KubeClient        ctrl_client.Client
	A2AHandler        a2a.A2AHandlerMux
	MCPHandler        *mcp.MCPHandler
	WatchedNamespaces []string
	DbClient          dbpkg.Client
	Authenticator     auth.AuthProvider
	Authorizer        auth.Authorizer
	ProxyURL          string
	Reconciler        reconciler.KagentReconciler
}

ServerConfig holds the configuration for the HTTP server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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