http

package
v0.0.0-...-28654c7 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 12 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(name string, httpConfig *config.Http, initializeRoutesFunc func(r *mux.Router)) *Server

func NewServerWithOptions

func NewServerWithOptions(name string, httpConfig *config.Http, serverOptions *ServerOptions) *Server

func (*Server) Logf

func (s *Server) Logf(pattern string, args ...interface{})

func (*Server) Serve

func (s *Server) Serve()

Serve is the entry-point for the http package. This takes a service, sets up http server (as a function of the config) adds routes.

func (*Server) Shutdown

func (s *Server) Shutdown() error

Shuts down the http server waiting for active connections to complete.

type ServerOptions

type ServerOptions struct {
	InitializeRoutesFunc func(r *mux.Router)
	Middlware            []alice.Constructor
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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