app

package
v0.0.0-...-1185af5 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package app initializes the application locator.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GracefulDBShutdown

func GracefulDBShutdown(ctx context.Context, l *Locator)

GracefulDBShutdown close all db opened connection.

Types

type Locator

type Locator struct {
	Config  *config.Config
	DBx     *sqlx.DB
	Storage *sqluct.Storage

	handler.Provider

	ctxd.LoggerProvider

	clockSvc.ClockProvider

	GRPCUnitaryInterceptors []grpc.UnaryServerInterceptor

	KitTemplateService     *service.KitTemplateService
	KitTemplateRESTService *service.KitTemplateRESTService
	// contains filtered or unexported fields
}

Locator defines application resources.

func NewServiceLocator

func NewServiceLocator(cfg *config.Config, opts ...Option) (*Locator, error)

NewServiceLocator creates application locator.

func (*Locator) ZapLogger

func (l *Locator) ZapLogger() *zap.Logger

ZapLogger returns *zap.Logger that used in Logger.

type Option

type Option func(l *Locator)

Option sets up service locator.

Jump to

Keyboard shortcuts

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