httpserver

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package httpserver implements HTTP server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Infof(format string, args ...interface{})
	Errorf(format string, args ...interface{})
	Fatalf(format string, args ...interface{})
}

type Option

type Option func(*Server)

Option -.

func AddLogger

func AddLogger(logger Logger) Option

func CertPath

func CertPath(certPath string) Option

func Host

func Host(host string) Option

func KeyPath

func KeyPath(keyPath string) Option

func Port

func Port(port string) Option

Port -.

type Server

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

Server -.

func New

func New(handler http.Handler, opts ...Option) *Server

New -.

func (*Server) GetListenPort

func (s *Server) GetListenPort() string

func (*Server) Infof

func (s *Server) Infof(format string, args ...interface{})

func (*Server) Start

func (s *Server) Start() error

func (*Server) StartWithRandomPort

func (s *Server) StartWithRandomPort() error

Jump to

Keyboard shortcuts

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