internal

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrShutdownDependencies = errors.New("unable to shutdown at least one dependency")
View Source
var (
	ShuttingDown = false // This variable allows to ignore some errors inherited from the shutdown
)

Functions

func Dependencies

func Dependencies(p DependenciesParams)

func HTTPServer

func HTTPServer(p HTTPServerParams)

HTTPServer registers the routes for the server and starts the server on app start. uber-fx does not supports pointers while gocritics expect a pointer for heavy struct nolint:gocritic

func Shutdown

func Shutdown(app *fx.App)

func Start

func Start(app *fx.App)

Types

type DependenciesParams

type DependenciesParams struct {
	fx.In
	Lifecycle fx.Lifecycle

	Logger *zap.Logger
}

type FXServer

type FXServer struct {
	Lifecycle  fx.Lifecycle
	Shutdowner fx.Shutdowner
	Logger     *zap.Logger
}

func NewFXServer

func NewFXServer(lifecycle fx.Lifecycle, shutdowner fx.Shutdowner, logger *zap.Logger) *FXServer

func (FXServer) Run

func (server FXServer) Run(name string, transport transport.Server)

type HTTPServerParams

type HTTPServerParams struct {
	fx.In
	Server    *FXServer
	Transport transport.Server `name:"http"`
}

HTTPServerParams is the input parameter struct for the modules that contains its dependencies.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳