server

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2026 License: MIT Imports: 8 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 encapsulates the HTTP server lifecycle.

func New

func New(authenticator *auth.Authenticator, log *logger.Logger, host, port string) *Server

New creates a Server with routes and timeouts configured.

func (*Server) Addr

func (s *Server) Addr() string

Addr returns the listen address.

func (*Server) IsRunning

func (s *Server) IsRunning() bool

IsRunning returns whether the server is currently running.

func (*Server) Start

func (s *Server) Start() error

Start begins listening in a goroutine. It returns an error if the listener cannot be established.

func (*Server) Stop

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

Stop performs a graceful shutdown of the server.

Jump to

Keyboard shortcuts

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