server

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2025 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address string `yaml:"address"`
	Network string `yaml:"network"`
	SSL     *SSL   `yaml:"ssl,omitempty"`
}

type SSL added in v0.6.0

type SSL struct {
	Certs      []listen.Certificate `yaml:"certs,omitempty"`
	NextProtos []string             `yaml:"next_protos,omitempty"`
}

type Server added in v0.6.0

type Server interface {
	HandleFunc(func(ctx context.Context, w io.Writer, r io.Reader, addr net.Addr))
	ListenAndServe(ctx context.Context) error
}

func New

func New(conf Config) Server

Jump to

Keyboard shortcuts

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