server

package
v0.0.0-...-41d89a1 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Default Server
	DefaultServer, _ = newServer()
)

Functions

This section is empty.

Types

type Option

type Option func(options *Options)

func Address

func Address(a string) Option

func ShutdownWait

func ShutdownWait(t time.Duration) Option

type Options

type Options struct {
	Address      string
	ShutdownWait time.Duration
}

type Server

type Server interface {

	// Init initialises options
	Init(...Option) error

	Options() Options

	Start() error

	Stop() error
}

Jump to

Keyboard shortcuts

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