http

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Config

type Config struct {
	Port int `validate:"gt=1000,lt=65536"`
}

type Server

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

func (Server) ListenAndServe

func (s Server) ListenAndServe(_ context.Context) error

func (Server) Validate

func (obj Server) Validate() error

func (Server) WaitForShutdown

func (s Server) WaitForShutdown(ctx context.Context) error

type ServerOption

type ServerOption c.Option[Server]

func WithServerHandler

func WithServerHandler(h http.Handler) ServerOption

func WithServerLogger

func WithServerLogger(logger *zap.Logger) ServerOption

func WithServerName

func WithServerName(name string) ServerOption

func WithServerPort

func WithServerPort(port int) ServerOption

func WithServerShutdownTimeout

func WithServerShutdownTimeout(t time.Duration) ServerOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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