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.
Click to show internal directories.
Click to hide internal directories.