web

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatBytes

func FormatBytes(num float64, suffix string) (str string)

FormatBytes formats a floating number as string with closest unit

func FormatRate

func FormatRate(rate float64) (str string)

FormatRate formats a floating point b/s as string with closest unit

Types

type Config

type Config struct {
	Addr  string
	Debug bool

	DocHandler http.Handler
}

type Service

type Service interface {
	Serve(ctx context.Context) error
	Stop(ctx context.Context) error
}

func New

func New(cfg Config) Service

New return new web server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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