bootstrap

package
v2.0.23 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpServer

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

HttpServer is a BootstrapHandler that mirrors the generic pkg/bootstrap/handlers.HttpServer but omits the request-timeout middleware and the http.Server WriteTimeout, both of which would terminate MCP Streamable HTTP / SSE connections.

func NewHttpServer

func NewHttpServer(router *echo.Echo, doListenAndServe bool) *HttpServer

NewHttpServer constructs an HttpServer for the given echo router.

func (*HttpServer) BootstrapHandler

func (b *HttpServer) BootstrapHandler(
	ctx context.Context,
	wg *sync.WaitGroup,
	_ startup.Timer,
	dic *di.Container,
) bool

BootstrapHandler fulfills the BootstrapHandler contract. It installs the common bootstrap middlewares (sans request timeout), starts the HTTP server, and registers a shutdown goroutine bound to ctx.

func (*HttpServer) IsRunning

func (b *HttpServer) IsRunning() bool

IsRunning reports whether the handler's lifecycle is active (started, ctx not yet cancelled) — true even when doListenAndServe is false. Consumers poll it from another goroutine for delayed shutdown, hence the atomic flag.

Jump to

Keyboard shortcuts

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