server

package module
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: MIT Imports: 11 Imported by: 0

README

App

A minimal golang server application boilerplate.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Server)

func WithAutoCert

func WithAutoCert(dirCache string, hostWhitelist ...string) Option

func WithHost

func WithHost(ip string) Option

func WithPort

func WithPort(port int) Option

func WithServer

func WithServer(b Provider) Option

func WithStopChan

func WithStopChan(stopChan chan os.Signal) Option

type Provider

type Provider interface {
	GracefulStop()
	Serve(net.Listener) error
}

type Server

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

func New

func New(options ...Option) *Server

func (*Server) Start

func (s *Server) Start() error

type TLSProvider

type TLSProvider interface {
	TLSConfig() (*tls.Config, error)
}

Jump to

Keyboard shortcuts

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