httpserver

package
v0.53.9 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Server) *Server

func WithBindAddr

func WithBindAddr(addr string) Option

func WithBindPort

func WithBindPort(port int) Option

func WithHandler

func WithHandler(h http.Handler) Option

func WithResponse

func WithResponse(resp []byte) Option

func WithTLSConfig

func WithTLSConfig(tlsConfig *tls.Config) Option

type Server

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

func New

func New(options ...Option) *Server

func (*Server) BindAddr

func (s *Server) BindAddr() string

func (*Server) BindPort

func (s *Server) BindPort() int

func (*Server) Close

func (s *Server) Close() error

func (*Server) Run

func (s *Server) Run() error

Jump to

Keyboard shortcuts

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