server

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2026 License: GPL-3.0 Imports: 15 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
}

func New

func New(cfg *config.Config, log *slog.Logger, st store.Store, ih *ingest.Handler, ar *api.Router) *Server

func (*Server) Shutdown

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

Shutdown triggers a graceful shutdown of all listeners.

func (*Server) Start

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

Start binds the listeners and begins serving. It returns once both listeners are accepting connections. Use Wait to block on shutdown.

func (*Server) URL

func (s *Server) URL() string

URL returns the browser-openable URL for the UI.

func (*Server) WithGRPC added in v0.14.0

func (s *Server) WithGRPC(h *ingest.GRPCHandler) *Server

WithGRPC attaches the OTLP gRPC handler. Pass nil (or omit the call) to keep the gRPC listener disabled. Chainable.

func (*Server) WithMCP added in v0.15.0

func (s *Server) WithMCP(h http.Handler) *Server

WithMCP attaches the read-only MCP HTTP handler, mounted at /mcp on the UI listener. Pass nil (or omit the call) to leave the endpoint off. Chainable.

Jump to

Keyboard shortcuts

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