service

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: GPL-3.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildLogger

func BuildLogger(cfg LogConfig) logging.Writer

Types

type LogConfig added in v0.0.12

type LogConfig struct {
	LogDriver    string
	LogLevel     string
	RequestBody  bool
	ResponseBody bool
	JSON         bool
}

type Server

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

func New

func New(cxt context.Context, cfg ServerConfig) *Server

func (*Server) AddCustomLogger

func (s *Server) AddCustomLogger(lw logging.Writer)

func (*Server) Start added in v0.0.11

func (s *Server) Start(r chi.Router) error

type ServerConfig

type ServerConfig struct {
	BindingIP         string
	BindingPort       string
	LogLevel          string
	ReadTimeout       int
	ReadHeaderTimeout int
	WriteTimeout      int
	IdleTimeout       int
}

Jump to

Keyboard shortcuts

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