server

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func RunServer

func RunServer(ctx context.Context, config ServerConfig) error

RunServer is the main entry point for running the server

Types

type Server

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

Server represents the HTTP server

func NewServer

func NewServer(config ServerConfig) (*Server, error)

NewServer creates a new HTTP server

func (*Server) Start

func (s *Server) Start() error

Start starts the HTTP server

func (*Server) Stop

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

Stop gracefully stops the server

type ServerConfig

type ServerConfig struct {
	Address      string
	ScriptFile   string
	LibDir       string
	BearerToken  string
	AllowedPaths []string // Filesystem path restrictions (empty = no restrictions)
	MCPToolsDir  string   // Empty means MCP disabled
	MCPExecTool  bool     // Enable code execution tool
	TLSCert      string
	TLSKey       string
	TLSGenerate  bool
}

ServerConfig holds the configuration for the HTTP server

Jump to

Keyboard shortcuts

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