server

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 16 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(service, addr string, urlExt *url.URL, name, password string, dataFS fs.FS, log *logging.Logger, accessLog io.Writer) (*Server, error)

func (*Server) AddSubServer

func (s *Server) AddSubServer(path string, subServer SubServer)

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(cert, key string) (err error)

func (*Server) Shutdown

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

type SubServer

type SubServer interface {
	SetRoutes(pathPrefix string, route *mux.Router) error
}

type TestSubServer

type TestSubServer struct{}

func (*TestSubServer) MainHandler

func (tss *TestSubServer) MainHandler(w http.ResponseWriter, r *http.Request)

func (*TestSubServer) ServeHTTP

func (tss *TestSubServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*TestSubServer) SetRoutes

func (tss *TestSubServer) SetRoutes(pathPrefix string, router *mux.Router) error

Jump to

Keyboard shortcuts

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