server

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package server provides a simple web server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(addr string, h http.Handler, opts ...Option) error

Run starts a web server.

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option is a server option.

type OptionCertFile

type OptionCertFile string

OptionCertFile is the server certificate file.

type OptionIdleTimeout

type OptionIdleTimeout time.Duration

OptionIdleTimeout is the server idle timeout.

type OptionKeyFile

type OptionKeyFile string

OptionKeyFile is the server key file.

type OptionReadTimeout

type OptionReadTimeout time.Duration

OptionReadTimeout is the server read timeout.

type OptionShutdownPeriod

type OptionShutdownPeriod time.Duration

OptionShutdownPeriod is the server shutdown period.

type OptionWriteTimeout

type OptionWriteTimeout time.Duration

OptionWriteTimeout is the server write timeout.

Jump to

Keyboard shortcuts

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