server

package
v0.0.0-...-735ef63 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Timeout = 3 * time.Second
)

Variables

This section is empty.

Functions

func NewServerMan

func NewServerMan(opts ...Option) *man

func RegisterServer

func RegisterServer(svr Server)

func RegisterServers

func RegisterServers(servers ...Server)

func Start

func Start(opts ...Option)

func Stop

func Stop(ctx context.Context)

Types

type Option

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

func WithAsync

func WithAsync(async bool) Option

func WithWait

func WithWait(wait bool) Option

type Server

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

Jump to

Keyboard shortcuts

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