setuputil

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 25 Imported by: 4

README

setup

安装wire: go install github.com/google/wire/cmd/wire@latest



Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(launcherManager LauncherManager) error

func GetAuthManager

func GetAuthManager(launcherManager LauncherManager) (authpkg.AuthRepo, error)

func GetConsulClient

func GetConsulClient(launcherManager LauncherManager) (*consulapi.Client, error)

func GetJaegerExporter

func GetJaegerExporter(launcherManager LauncherManager) (*otlptrace.Exporter, error)

func GetLogger

func GetLogger(launcherManager LauncherManager) (log.Logger, error)

func GetLoggerForHelper

func GetLoggerForHelper() (log.Logger, error)

func GetLoggerForMiddleware

func GetLoggerForMiddleware(launcherManager LauncherManager) (log.Logger, error)

func GetMongoClient added in v0.0.4

func GetMongoClient(launcherManager LauncherManager) (*mongo.Client, error)

func GetMysqlDBConn

func GetMysqlDBConn(launcherManager LauncherManager) (*gorm.DB, error)

func GetPostgresDBConn

func GetPostgresDBConn(launcherManager LauncherManager) (*gorm.DB, error)

func GetRabbitmqConn

func GetRabbitmqConn(launcherManager LauncherManager) (*amqp.ConnectionWrapper, error)

func GetRedisClient

func GetRedisClient(launcherManager LauncherManager) (redis.UniversalClient, error)

func GetTokenManager

func GetTokenManager(launcherManager LauncherManager) (authpkg.TokenManger, error)

func LoadingConfig

func LoadingConfig(configFilePath string, configOpts ...configutil.Option) (*configpb.Bootstrap, error)

Types

type LauncherManager

type LauncherManager interface {
	GetConfig() *configpb.Bootstrap

	GetLogger() (log.Logger, error)
	GetLoggerForMiddleware() (log.Logger, error)
	GetLoggerForHelper() (log.Logger, error)

	GetRedisClient() (redis.UniversalClient, error)
	GetMysqlDBConn() (*gorm.DB, error)
	GetPostgresDBConn() (*gorm.DB, error)
	GetMongoClient() (*mongo.Client, error)
	GetConsulClient() (*consulapi.Client, error)
	GetJaegerExporter() (*otlptrace.Exporter, error)
	GetRabbitmqConn() (*amqp.ConnectionWrapper, error)

	GetTokenManager() (authpkg.TokenManger, error)
	GetAuthManager() (authpkg.AuthRepo, error)

	Close() error
}

func NewLauncherManager

func NewLauncherManager(configFilePath string, configOpts ...configutil.Option) (LauncherManager, error)

func NewLauncherManagerWithCleanup

func NewLauncherManagerWithCleanup(configFilePath string, configOpts ...configutil.Option) (LauncherManager, func(), error)

func NewSingletonLauncherManager

func NewSingletonLauncherManager(configFilePath string) (LauncherManager, error)

Jump to

Keyboard shortcuts

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