http

package
v0.0.0-...-69c2794 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

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

New はサーバーを生成します。

Types

type Option

type Option func(*httpServer)

Option はサーバーのオプションを設定するための関数です。

func WithHost

func WithHost(host string) Option

WithHost はホスト名を設定するオプションです。

func WithLogger

func WithLogger(l *slog.Logger) Option

WithLogger はロガーを設定するオプションです。

func WithPort

func WithPort(port string) Option

WithPort はポート番号を設定するオプションです。

func WithShutdownTimeout

func WithShutdownTimeout(timeout time.Duration) Option

WithShutdownTimeout はシャットダウンタイムアウトを設定するオプションです。

Jump to

Keyboard shortcuts

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