server

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2018 License: Apache-2.0 Imports: 20 Imported by: 0

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