startup_http

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2019 License: MIT Imports: 16 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// name for the service. Will be used in the admin panel
	Name string

	// Routing configuration. You can use the supplied router or
	// return your own handler.
	Routing func(*httprouter.Router) http.Handler

	// Extra admin handlers to register on the admin page
	AdminHandlers []admin.RouteConfig
}

type HTTPOptions

type HTTPOptions struct {
	Address string `long:"http-address" default:":3080" description:"Address to listen on."`

	TLSKeyFile  string `long:"http-tls-key" description:"Private key file to enable SSL support."`
	TLSCertFile string `long:"http-tls-cert" description:"Certificate file to enable SSL support."`

	BasicAuthUsername string `long:"http-admin-username" default:"admin" description:"Basic auth username for admin panel."`
	BasicAuthPassword string `long:"http-admin-password" default:"bingo" description:"Basic auth password for admin panel."`

	AccessLog string `long:"http-access-log" description:"Write http access log to a file. Defaults to stdout."`
}

func (HTTPOptions) Serve

func (opts HTTPOptions) Serve(config Config)

Jump to

Keyboard shortcuts

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