server

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

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 serves the GraphQL endpoint, MCP endpoint, WebSocket stream, and embedded frontend.

func New

func New(s *store.Store, hub *ws.Hub, frontendFS fs.FS, runtime otelopgraphql.RuntimeInfo) *Server

New creates a new Server. When runtime.Debug is true, HTTP requests are instrumented with OpenTelemetry spans via otelhttp. runtime.Version is advertised via the MCP Implementation metadata at /mcp.

func (*Server) Listen added in v0.4.0

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

Listen binds the configured HTTP listener without serving. Splitting listen from Serve lets the daemon entry point report bind errors back to the parent before signaling "ready". Safe to call more than once.

func (*Server) Shutdown

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

Shutdown gracefully shuts down the HTTP server.

func (*Server) Start

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

Start starts the HTTP server. It blocks until the server is shut down. If Listen has not been called yet, Start binds the listener itself.

Jump to

Keyboard shortcuts

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