Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ProviderSet = wire.NewSet( wire.FieldsOf(new(*Runtime), "Bootstrap", "Config", "Logger"), wire.FieldsOf(new(*corev1.Bootstrap), "Server", "Registry", "Data", "App", "Obs"), )
ProviderSet exposes stable bootstrap roots for application Wire graphs.
Functions ¶
Types ¶
type ConfApplier ¶ added in v0.6.3
type ConfApplier interface {
ApplyConf() error
}
ConfApplier is the composite contract for messages processed by protoc-gen-servora-conf. It runs the full post-scan sequence in a single call.
type Defaulter ¶ added in v0.6.0
type Defaulter interface {
ApplyDefaults()
}
Defaulter is the contract for messages that carry literal defaults declared via `(servora.conf.v1.field) = { default: ... }`.
type OptionalSection ¶ added in v0.6.0
type OptionalSection interface {
SectionOptional() bool
}
OptionalSection marks a Section whose absence from the config source is non-fatal. When SectionOptional reports true and the key is missing, Scan skips both Value(key).Scan and ApplyConf for that target.
type RequiredChecker ¶ added in v0.6.3
type RequiredChecker interface {
CheckRequired() error
}
RequiredChecker is the contract for messages that carry required-field rules. Typically consumed via ConfApplier; exposed for testing and direct use.
type Runtime ¶
type Runtime struct {
Bootstrap *corev1.Bootstrap
Config kconfig.Config
Logger *slog.Logger
// contains filtered or unexported fields
}
Runtime 聚合启动阶段产物与 runtime 级资源清理句柄。
func NewRuntime ¶ added in v0.7.1
NewRuntime 加载配置并初始化日志、追踪与 Kratos 应用默认项。
type Section ¶ added in v0.6.0
type Section interface {
// SectionKey returns the dotted key under which the section lives in the
// merged kratos config (e.g. "broker", "audit", "data.kafka").
SectionKey() string
}
Section is the contract implemented by configuration messages that opt into keyed scanning via bootstrap.Scan. Implementations are typically produced by protoc-gen-servora-conf from `(servora.conf.v1.section)`.