server

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Http

type Http interface {
	Start()
	IsAlive() bool
}

Http interface exposes methods for starting and liveness probing.

type HttpServer

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

HttpServer implements Http, wraps all dependencies required for running the HTTP server.

func New

func New(
	ctx context.Context,
	cfg config.Config,
	db storage.Storage,
	backend upstream.Upstream,
	governor orchestrator.Governor,
	probe liveness.Prober,
	meter metrics.Meter,
) (*HttpServer, error)

New creates a new HttpServer, initializing metrics and the HTTP server itself. If any step fails, returns an error and performs cleanup.

func (*HttpServer) IsAlive

func (s *HttpServer) IsAlive() bool

IsAlive returns true if the server is marked as alive.

func (*HttpServer) Start

func (s *HttpServer) Start()

Start runs the HTTP server in a goroutine and waits for it to finish.

Jump to

Keyboard shortcuts

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