Versions in this module Expand all Collapse all v1 v1.0.0 Jan 12, 2026 Changes in this version + func Get[T any](c *DependencyContainer) (T, bool) + func Has[T any](c *DependencyContainer) bool + func MustGet[T any](c *DependencyContainer) T + func Register[T any](c *DependencyContainer, instance T) + func SetFieldByPath(registry *DefaultConfigRegistry, module, fieldPath, value string) error + func ValidateConfig(cfg ConfigRegistry) error + type App struct + ClickHouse *clickhouse.ClickHouseClient + Config ConfigRegistry + Elasticsearch *elasticsearch.ElasticsearchClient + Email *email.EmailClient + HTTPServer *http.Server + Handler interface{} + MessageQueue *messagequeue.Client + MongoDB *mongodb.MongoDBClient + MySQL *gorm.DB + OSS *oss.StoreFactory + PostgreSQL *gorm.DB + RateLimitManager ratelimit.RateLimitManager + Redis *redis.Client + Router *gin.Engine + ServiceName string + XxlJob xxljob.Executor + func (a *App) GetClickHouse() *clickhouse.ClickHouseClient + func (a *App) GetDependencies() DependencyList + func (a *App) GetDependencyContainer() *DependencyContainer + func (a *App) GetElasticsearch() *elasticsearch.ElasticsearchClient + func (a *App) GetEmail() *email.EmailClient + func (a *App) GetMessageQueue() *messagequeue.Client + func (a *App) GetModuleRegistry() *ModuleRegistry + func (a *App) GetMongoDB() *mongodb.MongoDBClient + func (a *App) GetMySQL() *gorm.DB + func (a *App) GetOSS() *oss.StoreFactory + func (a *App) GetPostgreSQL() *gorm.DB + func (a *App) GetRedis() *redis.Client + func (a *App) GetRouter() *gin.Engine + func (a *App) GetServiceRegistry() *ServiceRegistry + func (a *App) GetXxlJob() xxljob.Executor + func (a *App) Shutdown() error + func (a *App) StartHTTPServer() error + func (a *App) StartRPCServer() (*Server, error) + type AppBuilder struct + func NewAppBuilder(cfg ConfigRegistry) *AppBuilder + func (b *AppBuilder) Build() (*App, error) + func (b *AppBuilder) RegisterDependency(instance interface{}) + func (b *AppBuilder) WithClickHouse() *AppBuilder + func (b *AppBuilder) WithConfigCenter(cfg *configcenter.Config, opts ...ConfigCenterOption) *AppBuilder + func (b *AppBuilder) WithCron() *AppBuilder + func (b *AppBuilder) WithDependency(name string, depType DependencyType, init DependencyInitializer) *AppBuilder + func (b *AppBuilder) WithDistributedLock() *AppBuilder + func (b *AppBuilder) WithElasticsearch() *AppBuilder + func (b *AppBuilder) WithEmail() *AppBuilder + func (b *AppBuilder) WithHTTP(configDir string, routeSetupFunc RouteSetupFunc) *AppBuilder + func (b *AppBuilder) WithLocalCache() *AppBuilder + func (b *AppBuilder) WithMessageQueue() *AppBuilder + func (b *AppBuilder) WithModules(modules ...Module) *AppBuilder + func (b *AppBuilder) WithMongoDB() *AppBuilder + func (b *AppBuilder) WithMySQL() *AppBuilder + func (b *AppBuilder) WithOSS() *AppBuilder + func (b *AppBuilder) WithPostgreSQL() *AppBuilder + func (b *AppBuilder) WithRateLimit() *AppBuilder + func (b *AppBuilder) WithRedis() *AppBuilder + func (b *AppBuilder) WithServices() *AppBuilder + func (b *AppBuilder) WithWebSocket() *AppBuilder + func (b *AppBuilder) WithXxlJob(middlewares ...xxljob.Middleware) *AppBuilder + type ConfigCenterOption func(*configCenterOptions) + func WithFieldSetter(setter func(module, fieldPath, value string) error, prefixes []string) ConfigCenterOption + func WithReloaderFactories(factories ...func(*App) []hotreload.Reloader) ConfigCenterOption + func WithReloaders(reloaders ...hotreload.Reloader) ConfigCenterOption + type ConfigRegistry interface + GetClickHouse func() (*clickhouse.Config, error) + GetConfigCenter func() (*configcenter.Config, error) + GetElasticsearch func() (*elasticsearch.Config, error) + GetEmail func() (*email.Config, error) + GetLog func() (*log.Config, error) + GetMessageQueue func() (*messagequeue.Config, error) + GetMongoDB func() (*mongodb.Config, error) + GetMySQL func() (*db.MySQLConfig, error) + GetOSS func() (*oss.Config, error) + GetPostgreSQL func() (*db.PostgreSQLConfig, error) + GetRedis func() (*db.RedisConfig, error) + GetServer func() (*ServerConfig, error) + GetServices func() (map[string]ServiceConfig, error) + GetWebSocket func() (*websocket.Config, error) + GetXxlJob func() (*xxljob.Config, error) + type ConfigValidator struct + func NewConfigValidator() *ConfigValidator + func (v *ConfigValidator) Validate(cfg ConfigRegistry) error + type DefaultConfigRegistry struct + ClickHouse *clickhouse.Config + ConfigCenter *configcenter.Config + Elasticsearch *elasticsearch.Config + Email *email.Config + Log *log.Config + MessageQueue *messagequeue.Config + MongoDB *mongodb.Config + Mysql *db.MySQLConfig + OSS *oss.Config + PostgreSQL *db.PostgreSQLConfig + Redis *db.RedisConfig + Server *ServerConfig + Services map[string]ServiceConfig + WebSocket *websocket.Config + XxlJob *xxljob.Config + func (r *DefaultConfigRegistry) GetClickHouse() (*clickhouse.Config, error) + func (r *DefaultConfigRegistry) GetConfigCenter() (*configcenter.Config, error) + func (r *DefaultConfigRegistry) GetElasticsearch() (*elasticsearch.Config, error) + func (r *DefaultConfigRegistry) GetEmail() (*email.Config, error) + func (r *DefaultConfigRegistry) GetLog() (*log.Config, error) + func (r *DefaultConfigRegistry) GetMessageQueue() (*messagequeue.Config, error) + func (r *DefaultConfigRegistry) GetMongoDB() (*mongodb.Config, error) + func (r *DefaultConfigRegistry) GetMySQL() (*db.MySQLConfig, error) + func (r *DefaultConfigRegistry) GetOSS() (*oss.Config, error) + func (r *DefaultConfigRegistry) GetPostgreSQL() (*db.PostgreSQLConfig, error) + func (r *DefaultConfigRegistry) GetRedis() (*db.RedisConfig, error) + func (r *DefaultConfigRegistry) GetServer() (*ServerConfig, error) + func (r *DefaultConfigRegistry) GetServices() (map[string]ServiceConfig, error) + func (r *DefaultConfigRegistry) GetWebSocket() (*websocket.Config, error) + func (r *DefaultConfigRegistry) GetXxlJob() (*xxljob.Config, error) + func (r *DefaultConfigRegistry) HasClickHouse() bool + func (r *DefaultConfigRegistry) HasConfigCenter() bool + func (r *DefaultConfigRegistry) HasEmail() bool + func (r *DefaultConfigRegistry) HasLog() bool + func (r *DefaultConfigRegistry) HasMessageQueue() bool + func (r *DefaultConfigRegistry) HasMongoDB() bool + func (r *DefaultConfigRegistry) HasMySQL() bool + func (r *DefaultConfigRegistry) HasOSS() bool + func (r *DefaultConfigRegistry) HasPostgreSQL() bool + func (r *DefaultConfigRegistry) HasRedis() bool + func (r *DefaultConfigRegistry) HasServer() bool + func (r *DefaultConfigRegistry) HasServices() bool + func (r *DefaultConfigRegistry) HasWebSocket() bool + func (r *DefaultConfigRegistry) HasXxlJob() bool + func (r *DefaultConfigRegistry) MustGetClickHouse() *clickhouse.Config + func (r *DefaultConfigRegistry) MustGetConfigCenter() *configcenter.Config + func (r *DefaultConfigRegistry) MustGetEmail() *email.Config + func (r *DefaultConfigRegistry) MustGetLog() *log.Config + func (r *DefaultConfigRegistry) MustGetMessageQueue() *messagequeue.Config + func (r *DefaultConfigRegistry) MustGetMongoDB() *mongodb.Config + func (r *DefaultConfigRegistry) MustGetMySQL() *db.MySQLConfig + func (r *DefaultConfigRegistry) MustGetOSS() *oss.Config + func (r *DefaultConfigRegistry) MustGetPostgreSQL() *db.PostgreSQLConfig + func (r *DefaultConfigRegistry) MustGetRedis() *db.RedisConfig + func (r *DefaultConfigRegistry) MustGetServer() *ServerConfig + func (r *DefaultConfigRegistry) MustGetServices() map[string]ServiceConfig + func (r *DefaultConfigRegistry) MustGetWebSocket() *websocket.Config + func (r *DefaultConfigRegistry) MustGetXxlJob() *xxljob.Config + type Dependency struct + Error error + Initialized bool + Name string + Type DependencyType + type DependencyContainer struct + func NewDependencyContainer() *DependencyContainer + func (c *DependencyContainer) GetAll() []reflect.Type + type DependencyInitializer func(builder *AppBuilder) error + type DependencyList []Dependency + func (dl DependencyList) GetDependency(depType DependencyType) *Dependency + func (dl DependencyList) HasDependency(depType DependencyType) bool + func (dl DependencyList) String() string + type DependencyType string + const DependencyClickHouse + const DependencyConfigCenter + const DependencyCron + const DependencyDistributedLock + const DependencyElasticsearch + const DependencyEmail + const DependencyKafka + const DependencyLocalCache + const DependencyLog + const DependencyMQ + const DependencyMongoDB + const DependencyMySQL + const DependencyOSS + const DependencyPostgreSQL + const DependencyRateLimit + const DependencyRedis + const DependencyWebSocket + const DependencyXxlJob + type Duration = pkgConfig.Duration + type GRPCConfig struct + Host string + Port string + SizeLimit GRPCSizeLimitConfig + func (c *GRPCConfig) Address() string + func (c *GRPCConfig) FullAddress() string + type GRPCServiceRegister func(server *grpc.Server) + type GRPCSizeLimitConfig struct + Enabled bool + MaxRecvMsgSize int + MaxSendMsgSize int + type GatewayServiceRegister func(ctx context.Context, mux *runtime.ServeMux, grpcAddr string, ...) error + type HTTPConfig struct + Host string + Port string + func (c *HTTPConfig) Address() string + func (c *HTTPConfig) FullAddress() string + type Lifecycle struct + func NewLifecycle() *Lifecycle + func (l *Lifecycle) IsStarted() bool + func (l *Lifecycle) RegisterShutdown(fn func() error) + func (l *Lifecycle) SetStarted() + func (l *Lifecycle) Shutdown() error + type Module interface + Initialize func(app *App) ([]ServiceRegistration, error) + Name func() string + Shutdown func() error + type ModuleRegistry struct + func NewModuleRegistry() *ModuleRegistry + func (r *ModuleRegistry) GetModules() []Module + func (r *ModuleRegistry) InitializeAll(app *App) ([]ServiceRegistration, error) + func (r *ModuleRegistry) Register(module Module) + func (r *ModuleRegistry) RegisterAll(modules ...Module) + func (r *ModuleRegistry) ShutdownAll() error + type RouteSetupFunc func(router *gin.Engine, handler interface{}) error + type Server struct + func (s *Server) GracefulStop() + func (s *Server) GracefulStopWithTimeout(timeout time.Duration) + type ServerConfig struct + Features pkgConfig.FeaturesConfig + GRPC GRPCConfig + HTTP *HTTPConfig + ServiceName string + type ServiceConfig struct + Address string + type ServiceRegistration struct + GRPCRegister GRPCServiceRegister + GatewayRegister GatewayServiceRegister + Name string + type ServiceRegistry struct + func NewServiceRegistry() *ServiceRegistry + func (r *ServiceRegistry) GetServices() []ServiceRegistration + func (r *ServiceRegistry) Register(reg ServiceRegistration) + func (r *ServiceRegistry) RegisterAll(regs ...ServiceRegistration) + func (r *ServiceRegistry) RegisterToGRPCServer(server *grpc.Server) + func (r *ServiceRegistry) RegisterToGateway(ctx context.Context, gwHandler interface{ ... }, grpcAddr string, ...) error