server

package
v0.0.0-...-b02c517 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler func(stream.Stream) error

Handler is a stream handler.

type Option

type Option func(*Options)

type Options

type Options struct{}

type Server

type Server interface {
	// Init initializes the server itself.
	Init(...Option)
	// Handle registers a stream handler.
	Handle(string, Handler) error
	// Serve launches the server using the given listener.
	Serve(net.Listener) error
}
var Default Server

func New

func New(opts ...Option) Server

Jump to

Keyboard shortcuts

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