application

package
v0.0.0-...-9df3d9d Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	Context     context.Context
	Logger      *logger.CustomLogger
	Tracer      opentracing.Tracer
	DbClients   map[string]*DbClient
	GrpcClients map[string]*grpc.ClientConn
	GrpcServer  *grpc.Server
	HttpServer  *gin.Engine
	ServiceMode string
	TraceCloser func()
}

func Setup

func Setup(cfg *config.Config, c *cli.Context) (*Application, error)

func (*Application) Run

func (app *Application) Run(cfg *config.Config) error

type DbClient

type DbClient struct {
	Type       DbConnectionType
	SqlAdapter *sql.DB
	PgAdapter  *pg.DB
}

type DbConnectionType

type DbConnectionType uint32
const (
	ReadConnection DbConnectionType = iota
	WriteConnection
)

Jump to

Keyboard shortcuts

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