Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BootstrapAndRun ¶
func BootstrapAndRun(configPath, name, version string, builder appBuilder, opts ...BootstrapOption) error
BootstrapAndRun 对外暴露统一启动入口。
Types ¶
type BootstrapOption ¶
type BootstrapOption func(*bootstrapOptions)
BootstrapOption 配置启动行为的可选项。
func WithEnvPrefix ¶
func WithEnvPrefix() BootstrapOption
WithEnvPrefix 启用环境变量前缀。 启用后,配置加载器会根据服务名推导前缀(如 iam.service → IAM_), 仅读取带前缀的环境变量覆盖配置。 默认不使用前缀,直接读取无前缀的环境变量。
Click to show internal directories.
Click to hide internal directories.