dispatcher

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Dependencies: go-shared/provider.AwareSet, internal/*validators.ValidatorSet, pkg/micro.Micro, go-shared/config.Configurator, ProviderHandlers
	WireSet = wire.NewSet(
		ProviderDispatcher,
		ProviderServices,
		ProviderValidators,
		ProviderCfg,
		ProviderGlobalCfg,
		wire.Struct(new(AppSet), "*"),
	)
	// Dependencies: go-shared/provider.AwareSet, internal/*validators.ValidatorSet, common.Services, common.Handlers, go-shared/config.Configurator
	WireTestSet = wire.NewSet(
		ProviderDispatcher,
		ProviderValidators,
		ProviderCfg,
		ProviderGlobalCfg,
		wire.Struct(new(AppSet), "*"),
	)
)

Functions

func ProviderGlobalCfg

func ProviderGlobalCfg(cfg config.Configurator) (*common.Config, func(), error)

ProviderGlobalCfg

func ProviderServices

func ProviderServices(srv *micro.Micro, cfg *micro.Config) common.Services

ProviderServices

func ProviderValidators

func ProviderValidators(v *validators.ValidatorSet) (validate *validator.Validate, _ func(), err error)

ProviderValidators

Types

type AppSet

type AppSet struct {
	Handlers common.Handlers
	Services common.Services
}

AppSet

type Config

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

Config

func ProviderCfg

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

ProviderCfg

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 struct {
	provider.LMT
	// contains filtered or unexported fields
}

Dispatcher

func New

func New(ctx context.Context, set provider.AwareSet, appSet AppSet, cfg *Config, globalCfg *common.Config, ms *micro.Micro) *Dispatcher

New

func ProviderDispatcher

func ProviderDispatcher(ctx context.Context, set provider.AwareSet, appSet AppSet, cfg *Config, globalCfg *common.Config, ms *micro.Micro) (*Dispatcher, func(), error)

ProviderDispatcher

func (*Dispatcher) BodyDumpMiddleware

func (d *Dispatcher) BodyDumpMiddleware() echo.MiddlewareFunc

BodyDumpMiddleware

func (*Dispatcher) Dispatch

func (d *Dispatcher) Dispatch(echoHttp *echo.Echo) error

dispatch

func (*Dispatcher) RawBodyPreMiddleware

func (d *Dispatcher) RawBodyPreMiddleware(next echo.HandlerFunc) echo.HandlerFunc

RawBodyPreMiddleware

func (*Dispatcher) RecoverMiddleware

func (d *Dispatcher) RecoverMiddleware() echo.MiddlewareFunc

RecoverMiddleware

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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