http

package
v0.0.0-...-749ffa6 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	basic.Config

	TLS       TLSConfig
	Cors      CorsConfig
	Logger    LoggerConfig
	RateLimit RateLimitConfig
}

type CorsConfig

type CorsConfig struct {
	Enable bool
}

type LoggerConfig

type LoggerConfig struct {
	Enable bool
}

type RateLimitConfig

type RateLimitConfig struct {
	RateLimit int
}

type Server

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

func New

func New(c Config) *Server

func (*Server) GINRouter

func (s *Server) GINRouter(router func(router gin.IRouter))

func (*Server) Httprouter

func (s *Server) Httprouter(router func(router *httprouter.Router))

func (*Server) Router

func (s *Server) Router(router func(mux *http.ServeMux))

func (*Server) Run

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

func (*Server) Shutdown

func (s *Server) Shutdown()

func (*Server) WithRegistry

func (s *Server) WithRegistry(reg registry.Registry)

type TLSConfig

type TLSConfig struct {
	Key  string
	Cert string
}

func (TLSConfig) Valid

func (c TLSConfig) Valid() bool

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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