Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppConfigCache ¶ added in v1.2.4
type AppConfigCache struct {
Ttl time.Duration // 正缓存兜底 TTL(整行快照)
NegativeTtl time.Duration // 空结果负缓存 TTL(与正缓存同 key,空串即哨兵)
}
AppConfigCache app_config 的 Redis 缓存口径
type Conf ¶
type Conf struct {
Upload *Upload // 上传与分片
Export *Export // 导出(首版不读取)
ObjectAudit *ObjectAudit // 离线对象核对
AppConfigCache *AppConfigCache // app_config 缓存
}
Conf business 段服务配置
type Context ¶
func MustContext ¶
func MustContext(ctx context.Context, opts ...kratosx.ContextOptionFunc) Context
func (Context) Auth ¶
func (c Context) Auth() *authorize.CheckAuthReply
type Export ¶
type Export struct {
LocalDir string // 本地工作目录;容量调度与本地清理见 .prd/草案-导出本地目录与容量调度.md
Lease time.Duration // 租约时长;单次导出最长耗时的 2~3 倍(P99 基准),同时复用为导出亲和锁 TTL
Heartbeat time.Duration // worker 心跳周期(顶 leased_at);须 < lease,建议 lease/3
WorkerCount int // worker 池大小
Retention time.Duration // 请求行保留期(30 天);须 >= export_ttl 最大值
CleanupInterval time.Duration // 产出物清理周期(expired_at 到期 → 删桶对象 → status=4)
LeaseReclaimInterval time.Duration // 租约恢复周期(leased_at 超租约 → status=3)
TaskReclaimInterval time.Duration // 任务行回收周期(status IN (2,3,4) 且无 export 引用 → DELETE)
}
Export 导出(⏸ 首版不实现,配置保留为设计占位,导出功能启动时才读取)
Click to show internal directories.
Click to hide internal directories.