httpsrv

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package httpsrv provides the HTTP server to handle all requests for metadataservice.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Logger          *zap.Logger
	Listen          string
	Debug           bool
	DB              *sqlx.DB
	AuthConfig      ginjwt.AuthConfig
	TrustedProxies  []string
	LookupEnabled   bool
	LookupClient    lookup.Client
	TemplateFields  map[string]template.Template
	ShutdownTimeout time.Duration
}

Server contains the HTTP server configuration

func (*Server) NewServer

func (s *Server) NewServer() *http.Server

NewServer returns a configured server

func (*Server) Run

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

Run will start the server listening on the specified address

Jump to

Keyboard shortcuts

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