Documentation
¶
Overview ¶
Package server implements MCP and REST API transports for Engram.
Index ¶
Constants ¶
const DefaultExpiryInterval = 10 * time.Minute
DefaultExpiryInterval is the default period between expiry cleanup runs.
Variables ¶
This section is empty.
Functions ¶
func StartExpiryCleanup ¶
StartExpiryCleanup launches a background goroutine that periodically deletes expired memories (valid_until > 0 && valid_until < now) from the store.
The goroutine respects ctx cancellation and stops cleanly when ctx is done. interval controls how often cleanup runs (default: 10 minutes). Pass 0 to use DefaultExpiryInterval.
The first run happens after one full interval (not immediately at startup) to avoid competing with the startup sequence.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server wraps the MCP server with Engram's memory operations.
func (*Server) GetMCPServer ¶
GetMCPServer returns the underlying mcp-go server for testing or advanced use.
func (*Server) ServeStdio ¶
ServeStdio starts the server using stdio transport (for MCP clients).