server

package
v0.0.0-...-08e1117 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 9 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 NewServer

func NewServer(logger *log.Logger) *Server

func (*Server) BlockingRun

func (s *Server) BlockingRun(router http.Handler, opts ServerOptions) int

func (*Server) Run

func (s *Server) Run(router http.Handler, sopts ServerOptions)

func (*Server) ServeWithReload

func (s *Server) ServeWithReload(router http.Handler, sopts ServerOptions)

func (*Server) Shutdown

func (s *Server) Shutdown()

type ServerOptions

type ServerOptions interface {
	GetAddr(bool) (string, error)
	GetTlsConfig(bool) (*tls.Config, error)
	GetTlsEnabled(bool) (bool, error)
}

type Service

type Service interface {
	Run() error
	Halt() error
	IsRunning() (bool, error)
	IsHalted() (bool, error)
}

Jump to

Keyboard shortcuts

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