server

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeDashboard

func ServeDashboard(mux *http.ServeMux)

ServeDashboard serves the graph visualization dashboard at /yaad/ui.

Types

type MCPServer

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

MCPServer wraps the MCP protocol server for Hawk integration.

func NewMCPServer

func NewMCPServer(eng *engine.Engine, _ string) *MCPServer

NewMCPServer creates an MCP server with all yaad tools registered.

func (*MCPServer) ServeStdio

func (s *MCPServer) ServeStdio() error

ServeStdio starts the MCP server on stdin/stdout.

type RESTServer

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

RESTServer serves the HTTP API.

func NewRESTServer

func NewRESTServer(eng *engine.Engine, addr string) *RESTServer

NewRESTServer creates a REST server.

func (*RESTServer) ListenAndServe

func (s *RESTServer) ListenAndServe() error

ListenAndServe starts the HTTP server with middleware.

func (*RESTServer) RegisterRoutes

func (s *RESTServer) RegisterRoutes(mux *http.ServeMux)

RegisterRoutes registers all routes on the given mux (useful for testing).

func (*RESTServer) Shutdown added in v0.3.0

func (s *RESTServer) Shutdown(ctx context.Context) error

Shutdown gracefully shuts down the REST server with a timeout.

func (*RESTServer) WithEmbedder

func (s *RESTServer) WithEmbedder(p embeddings.Provider) *RESTServer

WithEmbedder sets the embedding provider for vector search.

func (*RESTServer) WithProjectDir added in v0.3.0

func (s *RESTServer) WithProjectDir(dir string) *RESTServer

WithProjectDir sets the project directory for git-based staleness detection.

func (*RESTServer) WithTLS

func (s *RESTServer) WithTLS(cfg *stdtls.Config) *RESTServer

WithTLS sets TLS config on the server.

Jump to

Keyboard shortcuts

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