Documentation

Index

Constants

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

Variables

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