server

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: Apache-2.0, MIT Imports: 11 Imported by: 4

Documentation

Index

Constants

View Source
const OPTION_SOURCE = "http-server"

Variables

This section is empty.

Functions

func NormPath added in v0.2.0

func NormPath(p string) string

func Register

func Register(pattern string, handler func(http.ResponseWriter, *http.Request))

func RegisterHandler

func RegisterHandler(pattern string, handler http.Handler)

func ServeFromMainConfig added in v0.2.0

func ServeFromMainConfig(ctx context.Context, name string)

Types

type Config added in v0.2.0

type Config struct {
	ServerPortHTTP int
	BindAddress    string
}

func Get added in v0.2.0

func Get(cfg *configmain.Config) *Config

func (*Config) AddOptionsToSet added in v0.2.0

func (this *Config) AddOptionsToSet(set config.OptionSet)

type HTTPServer added in v0.2.0

type HTTPServer struct {
	logger.LogContext
	// contains filtered or unexported fields
}

func NewDefaultHTTPServer added in v0.2.0

func NewDefaultHTTPServer(ctx context.Context, logger logger.LogContext, name string) *HTTPServer

func NewHTTPServer added in v0.2.0

func NewHTTPServer(ctx context.Context, logger logger.LogContext, name string) *HTTPServer

func (*HTTPServer) Register added in v0.2.0

func (this *HTTPServer) Register(pattern string, handler func(http.ResponseWriter, *http.Request))

func (*HTTPServer) RegisterHandler added in v0.2.0

func (this *HTTPServer) RegisterHandler(pattern string, handler http.Handler)

func (*HTTPServer) Start added in v0.2.0

func (this *HTTPServer) Start(source certs.CertificateSource, bindAddress string, port int)

Start starts an HTTP/S server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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