bootstrap

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Zlib Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(components []InitConf) error

Types

type ApolloConf

type ApolloConf struct {
	ApConf           *pkg.ApolloConfPkg
	ApUpdateCallback pkg.ApUpdateCallback
}

type Component

type Component string
const (
	Config   Component = "Config"
	Tracer   Component = "Tracer"
	Database Component = "Database"
	Redis    Component = "Redis"
)

type ConfigConf added in v0.8.1

type ConfigConf struct {
	ConfigPath   string
	ConfigType   string
	ApolloConf   func() *ApolloConf
	InitCallback func()
}

ConfigConf 基础本地初始化配置

type DatabaseConf

type DatabaseConf struct {
	DbConf   map[string]*pkg.DbPoolConfig
	Callback func(gormDbs map[string]*gorm.DB)
}

DatabaseConf 数据库初始化配置

type InitConf added in v0.8.1

type InitConf struct {
	Component Component
	Conf      interface{}
}

type RedisConf

type RedisConf struct {
	Host      string `mapstructure:"host"`
	Port      int    `mapstructure:"port"`
	Password  string `mapstructure:"password"`
	PoolSize  int    `mapstructure:"pool_size"`
	DefaultDb int    `mapstructure:"default_db"`
	Prefix    string `mapstructure:"prefix"`
}

RedisConf redis缓存初始化配置

type TracerConf

type TracerConf struct {
	Enable          bool   `mapstructure:"enable"`
	Host            string `mapstructure:"host"`
	Port            int    `mapstructure:"port"`
	MainServiceName string `mapstructure:"main_service_name"`
}

TracerConf 链路跟踪初始化配置

Jump to

Keyboard shortcuts

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