server

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package server provides a http server with features; acme, cors, etc

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(o *Options)

func ACMEHosts

func ACMEHosts(hosts ...string) Option

func EnableACME

func EnableACME(b bool) Option

func EnableTLS

func EnableTLS(b bool) Option

func TLSConfig

func TLSConfig(t *tls.Config) Option

type Options

type Options struct {
	EnableACME bool
	EnableTLS  bool
	ACMEHosts  []string
	TLSConfig  *tls.Config
}

type Server

type Server interface {
	Address() string
	Init(opts ...Option) error
	Handle(path string, handler http.Handler)
	Start() error
	Stop() error
}

func NewServer

func NewServer(address string) Server

Jump to

Keyboard shortcuts

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