http

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Prefix           = "internal.http"
	UnmarshalKey     = "http"
	UnmarshalKeyBind = "http.bind"
)

Variables

View Source
var (
	WireSet = wire.NewSet(
		Provider,
		Cfg,
	)
	WireTestSet = wire.NewSet(
		Provider,
		CfgTest,
	)
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug bool   `fallback:"shared.debug"`
	Bind  string `required:"true"`
	// contains filtered or unexported fields
}

Config

func Cfg

func Cfg(cfg config.Configurator) (*Config, func(), error)

Cfg

func CfgTest

func CfgTest() (*Config, func(), error)

CfgTest

func (*Config) OnReload

func (c *Config) OnReload(callback func(ctx context.Context))

OnReload

func (*Config) Reload

func (c *Config) Reload(ctx context.Context)

Reload

type Dispatcher

type Dispatcher interface {
	Dispatch(http *echo.Echo) error
}

Dispatcher

type HTTP

type HTTP struct {
	provider.LMT
	// contains filtered or unexported fields
}

HTTP

func New

func New(ctx context.Context, set provider.AwareSet, dispatcher Dispatcher, cfg *Config) *HTTP

New

func Provider

func Provider(ctx context.Context, set provider.AwareSet, dispatcher Dispatcher, cfg *Config) (*HTTP, func(), error)

Provider

func (*HTTP) ListenAndServe

func (h *HTTP) ListenAndServe() (err error)

ListenAndServe

Jump to

Keyboard shortcuts

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