server

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2018 License: Apache-2.0 Imports: 19 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	KeyACMEEnabled       = "tls.acme.enabled"
	KeyACMEPort          = "tls.acme.port"
	KeyACMEHostWhitelist = "tls.acme.host_whitelist"
	KeyACMECacheDir      = "tls.acme.cache_dir"
)
View Source
const (
	KeyPort    = "port"
	KeyTLSPort = "tls.port"
)
View Source
const (
	KeyTLSEnabled  = "tls.enabled"
	KeyTLSCertFile = "tls.cert_file"
	KeyTLSKeyFile  = "tls.key_file"
)

Variables

This section is empty.

Functions

func GetCertificateFile

func GetCertificateFile(hello *tls.ClientHelloInfo) (*tls.Certificate, error)

func GetCertificateLocalhost

func GetCertificateLocalhost(hello *tls.ClientHelloInfo) (*tls.Certificate, error)

for testing

func ListenAndServe

func ListenAndServe(e http.Handler) error

func ListenAndServeTLS

func ListenAndServeTLS(h http.Handler) error

func NewDispatcher

func NewDispatcher(github, bitbucket http.HandlerFunc) http.HandlerFunc

func Validate

func Validate() error

func Wrap

func Wrap(e *echo.Echo, h http.HandlerFunc) func(echo.Context) error

Types

type GetCert

type GetCert func(*tls.ClientHelloInfo) (*tls.Certificate, error)

func ConfigureACME

func ConfigureACME(ch chan<- os.Signal) (*http.Server, GetCert)

type NopShutdownable

type NopShutdownable struct{}

func (*NopShutdownable) Shutdown

func (e *NopShutdownable) Shutdown(ctx context.Context) error

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New() *Server

func (*Server) Start

func (s *Server) Start() error

type Shutdownable

type Shutdownable interface {
	Shutdown(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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