wireapp

package module
v0.0.0-...-e52e8bd Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type App

type App interface {
	Start(ctx context.Context) error
	Shutdown(ctx context.Context) error
	Run()
}

App provides specification for implementing application shell.

type HTTPApp

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

HTTPApp provides application that uses HTTP base protocol.

func NewHTTPApp

func NewHTTPApp(cfg HTTPAppConfig) *HTTPApp

NewHTTPApp creating http application.

func (*HTTPApp) Register

func (app *HTTPApp) Register(handler http.Handler)

Register handler into http server.

func (*HTTPApp) Run

func (app *HTTPApp) Run()

func (*HTTPApp) Shutdown

func (app *HTTPApp) Shutdown(ctx context.Context) error

func (*HTTPApp) Start

func (app *HTTPApp) Start(ctx context.Context) error

type HTTPAppConfig

type HTTPAppConfig struct {
	Addr string `envconfig:"ADDR"`

	TLSCertFile string `envconfig:"TLS_CERT_FILE"`
	TLSKeyFile  string `envconfig:"TLS_KEY_FILE"`
	TLSEnabled  bool   `envconfig:"TLS_ENABLED"`
}

HTTPAppConfig is configuration for HTTPApp.

func ProvideHTTPAppConfigFromEnv

func ProvideHTTPAppConfigFromEnv() HTTPAppConfig

Directories

Path Synopsis
examples
httpsrv command

Jump to

Keyboard shortcuts

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