server

package
v0.0.0-...-ffc1a67 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerConfiguration

type HandlerConfiguration struct {
	Path        string
	HandlerFunc func(http.ResponseWriter, *http.Request)
	Methods     []string
}

type MuxConfiguration

type MuxConfiguration struct {
	PathPrefix string
	Handlers   []HandlerConfiguration
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(parameters ServerParameters) Server

func (*Server) Host

func (s *Server) Host() string

func (*Server) Port

func (s *Server) Port() int

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

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

type ServerParameters

type ServerParameters struct {
	fx.In

	Configuration    config.Configuration
	MuxConfiguration MuxConfiguration
	Logger           *zap.Logger
}

Jump to

Keyboard shortcuts

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