Documentation
¶
Index ¶
- func ActiveLegacyDatabaseSources(configuredPath string, status masterhistorybackfill.Status) []string
- func MarkHistorySourceDeleted(ctx context.Context, core *gorm.DB, deletedAtUnix int64) error
- func ReconcileHistorySourceDeletion(ctx context.Context, path string, markDeleted func(context.Context) error) error
- func SeedMasterSettingsSnapshot(application app.Application) error
- type BYOKSystemBaseURLsResponse
- type CleanupTableBatchRequest
- type CleanupTableBatchResponse
- type CleanupTablePreviewRequest
- type CleanupTablePreviewResponse
- type ClearLogBacklogRequest
- type ClearLogBacklogResponse
- type CompleteHistoryBackfillRequest
- type CompleteHistoryBackfillResponse
- type DatabaseStatus
- type DeleteLegacyFileRequest
- type DeleteLegacyFileResponse
- type GetSettingsRequest
- type Handler
- func (h *Handler) BYOKSystemBaseURLs(_ *app.Context, _ api.EmptyRequest) (BYOKSystemBaseURLsResponse, error)
- func (h *Handler) CleanupTableBatch(c *app.Context, req CleanupTableBatchRequest) (CleanupTableBatchResponse, error)
- func (h *Handler) CleanupTablePreview(c *app.Context, req CleanupTablePreviewRequest) (CleanupTablePreviewResponse, error)
- func (h *Handler) ClearLogBacklog(c *app.Context, req ClearLogBacklogRequest) (ClearLogBacklogResponse, error)
- func (h *Handler) CompleteHistoryBackfillNow(c *app.Context, req CompleteHistoryBackfillRequest) (CompleteHistoryBackfillResponse, error)
- func (h *Handler) DeleteHistoryBackfillLegacyArtifact(c *app.Context, req DeleteLegacyFileRequest) (DeleteLegacyFileResponse, error)
- func (h *Handler) DeleteHistoryBackfillSource(c *app.Context, req DeleteLegacyFileRequest) (DeleteLegacyFileResponse, error)
- func (h *Handler) GetSettings(c *app.Context, _ GetSettingsRequest) (SettingsResponse, error)
- func (h *Handler) PublicConfig(c *app.Context, _ api.EmptyRequest) (PublicConfigResponse, error)
- func (h *Handler) RetryHistoryBackfillNow(c *app.Context, _ RetryHistoryBackfillRequest) (RetryHistoryBackfillResponse, error)
- func (h *Handler) RetryLogQueueNow(c *app.Context, _ RetryLogQueueRequest) (RetryLogQueueResponse, error)
- func (h *Handler) SkipHistoryBackfillRemaining(c *app.Context, req SkipHistoryBackfillRequest) (SkipHistoryBackfillResponse, error)
- func (h *Handler) Stats(c *app.Context, _ StatsRequest) (StatsResponse, error)
- func (h *Handler) UpdateSettings(c *app.Context, req UpdateSettingsRequest) (SettingsResponse, error)
- type LogQueueStatus
- type PublicConfigResponse
- type RetryHistoryBackfillRequest
- type RetryHistoryBackfillResponse
- type RetryLogQueueRequest
- type RetryLogQueueResponse
- type SettingsResponse
- type SkipHistoryBackfillRequest
- type SkipHistoryBackfillResponse
- type StatsRequest
- type StatsResponse
- type StorageStatus
- type SystemInfo
- type TableStats
- type UpdateSettingsRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActiveLegacyDatabaseSources ¶ added in v0.0.14
func ActiveLegacyDatabaseSources(configuredPath string, status masterhistorybackfill.Status) []string
func MarkHistorySourceDeleted ¶ added in v0.0.14
func ReconcileHistorySourceDeletion ¶ added in v0.0.14
func SeedMasterSettingsSnapshot ¶ added in v0.0.15
func SeedMasterSettingsSnapshot(application app.Application) error
SeedMasterSettingsSnapshot loads the master-only settings registry once at startup. AgentSettings are intentionally excluded from this snapshot.
Types ¶
type BYOKSystemBaseURLsResponse ¶ added in v0.0.2
type BYOKSystemBaseURLsResponse struct {
URLs []string `json:"urls"`
}
BYOKSystemBaseURLsResponse lists code-pinned default BaseURL prefixes for BYOK. The admin Settings page renders these as "read-only system recommended" alongside the editable byok_base_url_allowlist setting (admin extra). Both are union-merged at validation time (see private_channel.validateBaseURLAllowlist).
type CleanupTableBatchRequest ¶ added in v0.0.15
type CleanupTableBatchResponse ¶ added in v0.0.15
type CleanupTablePreviewRequest ¶ added in v0.0.15
type CleanupTablePreviewResponse ¶ added in v0.0.15
type ClearLogBacklogRequest ¶ added in v0.0.14
type ClearLogBacklogRequest struct {
Confirm bool `form:"confirm"`
}
type ClearLogBacklogResponse ¶ added in v0.0.14
type CompleteHistoryBackfillRequest ¶ added in v0.0.14
type CompleteHistoryBackfillRequest struct {
Confirm bool `json:"confirm"`
}
type CompleteHistoryBackfillResponse ¶ added in v0.0.14
type CompleteHistoryBackfillResponse struct {
Completed bool `json:"completed"`
}
type DatabaseStatus ¶ added in v0.0.14
type DeleteLegacyFileRequest ¶ added in v0.0.14
type DeleteLegacyFileRequest struct {
Confirmation string `form:"confirmation"`
}
type DeleteLegacyFileResponse ¶ added in v0.0.14
type DeleteLegacyFileResponse struct {
Deleted bool `json:"deleted"`
}
type GetSettingsRequest ¶
type GetSettingsRequest struct{}
type Handler ¶
type Handler struct {
StatsCache *dao.StatsCache
ConnectedCount func() int
RefreshProbeTimings func(context.Context)
CoreDatabasePath string
LogDatabasePath string
LegacyDatabasePath string
CoreDatabase func() *gorm.DB
LogDatabase func() *gorm.DB
LogDatabaseReady func() bool
LogDatabaseError func() string
LogQueueSnapshot func() LogQueueStatus
RetryLogQueue func()
ClearLogQueueBacklog func() (ClearLogBacklogResponse, error)
LegacyArtifactSnapshot func() (masterdatabase.LegacyArtifact, error)
HistoryBackfillSnapshot func() masterhistorybackfill.Status
RetryHistoryBackfill func()
SkipHistoryBackfill func(context.Context) error
CompleteHistoryBackfill func(context.Context) error
DeleteLegacySource func(string) error
DeleteLegacyArtifact func(string) error
MarkHistorySourceDeleted func(context.Context) error
ReconcileHistorySourceDeleted func(context.Context, string) error
// contains filtered or unexported fields
}
func (*Handler) BYOKSystemBaseURLs ¶ added in v0.0.2
func (h *Handler) BYOKSystemBaseURLs(_ *app.Context, _ api.EmptyRequest) (BYOKSystemBaseURLsResponse, error)
BYOKSystemBaseURLs returns the code-pinned system default BYOK base URLs. Pure read; no DB access. Mutating this list requires editing internal/consts/byok.go and re-deploying.
func (*Handler) CleanupTableBatch ¶ added in v0.0.15
func (h *Handler) CleanupTableBatch(c *app.Context, req CleanupTableBatchRequest) (CleanupTableBatchResponse, error)
func (*Handler) CleanupTablePreview ¶ added in v0.0.15
func (h *Handler) CleanupTablePreview(c *app.Context, req CleanupTablePreviewRequest) (CleanupTablePreviewResponse, error)
func (*Handler) ClearLogBacklog ¶ added in v0.0.14
func (h *Handler) ClearLogBacklog(c *app.Context, req ClearLogBacklogRequest) (ClearLogBacklogResponse, error)
func (*Handler) CompleteHistoryBackfillNow ¶ added in v0.0.14
func (h *Handler) CompleteHistoryBackfillNow(c *app.Context, req CompleteHistoryBackfillRequest) (CompleteHistoryBackfillResponse, error)
func (*Handler) DeleteHistoryBackfillLegacyArtifact ¶ added in v0.0.14
func (h *Handler) DeleteHistoryBackfillLegacyArtifact(c *app.Context, req DeleteLegacyFileRequest) (DeleteLegacyFileResponse, error)
func (*Handler) DeleteHistoryBackfillSource ¶ added in v0.0.14
func (h *Handler) DeleteHistoryBackfillSource(c *app.Context, req DeleteLegacyFileRequest) (DeleteLegacyFileResponse, error)
func (*Handler) GetSettings ¶
func (h *Handler) GetSettings(c *app.Context, _ GetSettingsRequest) (SettingsResponse, error)
func (*Handler) PublicConfig ¶ added in v0.0.6
func (h *Handler) PublicConfig(c *app.Context, _ api.EmptyRequest) (PublicConfigResponse, error)
PublicConfig 暴露登录前/登录后前端都需要的平台开关。公开端点,无鉴权。
func (*Handler) RetryHistoryBackfillNow ¶ added in v0.0.14
func (h *Handler) RetryHistoryBackfillNow(c *app.Context, _ RetryHistoryBackfillRequest) (RetryHistoryBackfillResponse, error)
func (*Handler) RetryLogQueueNow ¶ added in v0.0.14
func (h *Handler) RetryLogQueueNow(c *app.Context, _ RetryLogQueueRequest) (RetryLogQueueResponse, error)
func (*Handler) SkipHistoryBackfillRemaining ¶ added in v0.0.14
func (h *Handler) SkipHistoryBackfillRemaining(c *app.Context, req SkipHistoryBackfillRequest) (SkipHistoryBackfillResponse, error)
func (*Handler) Stats ¶
func (h *Handler) Stats(c *app.Context, _ StatsRequest) (StatsResponse, error)
func (*Handler) UpdateSettings ¶
func (h *Handler) UpdateSettings(c *app.Context, req UpdateSettingsRequest) (SettingsResponse, error)
type LogQueueStatus ¶ added in v0.0.14
type LogQueueStatus struct {
Pending int `json:"pending"`
Retry int `json:"retry"`
Inflight int `json:"inflight"`
Bytes int64 `json:"bytes"`
OldestSeconds int64 `json:"oldest_seconds"`
Dropped uint64 `json:"dropped"`
LastError string `json:"last_error"`
}
func LogQueueStatusFrom ¶ added in v0.0.14
func LogQueueStatusFrom(status masterlogqueue.DeliveryStatus) LogQueueStatus
type PublicConfigResponse ¶ added in v0.0.6
type PublicConfigResponse struct {
RegistrationEnabled bool `json:"registration_enabled"`
InviteEnabled bool `json:"invite_enabled"`
// InviteUserMaxCodes 是普通用户名下有效邀请码数量上限;0 表示禁止普通用户建码。
// 前端据此(结合 isAdmin)决定是否展示邀请入口。
InviteUserMaxCodes int `json:"invite_user_max_codes"`
}
PublicConfigResponse 是无需鉴权即可读取的平台公开配置/特性开关。 后续同类公开 flag 直接往这里加字段。
type RetryHistoryBackfillRequest ¶ added in v0.0.14
type RetryHistoryBackfillRequest struct{}
type RetryHistoryBackfillResponse ¶ added in v0.0.14
type RetryHistoryBackfillResponse struct {
Woken bool `json:"woken"`
}
type RetryLogQueueRequest ¶ added in v0.0.14
type RetryLogQueueRequest struct{}
type RetryLogQueueResponse ¶ added in v0.0.14
type RetryLogQueueResponse struct {
Woken bool `json:"woken"`
}
type SettingsResponse ¶
type SkipHistoryBackfillRequest ¶ added in v0.0.14
type SkipHistoryBackfillRequest struct {
Confirm bool `form:"confirm"`
}
type SkipHistoryBackfillResponse ¶ added in v0.0.14
type SkipHistoryBackfillResponse struct {
Skipped bool `json:"skipped"`
}
type StatsRequest ¶
type StatsRequest struct{}
type StatsResponse ¶
type StatsResponse struct {
Tables []TableStats `json:"tables"`
System SystemInfo `json:"system"`
Storage StorageStatus `json:"storage"`
}
type StorageStatus ¶ added in v0.0.14
type StorageStatus struct {
CoreDB DatabaseStatus `json:"core_db"`
LogDB DatabaseStatus `json:"log_db"`
LegacyDB DatabaseStatus `json:"legacy_db"`
LegacyArtifact masterdatabase.LegacyArtifact `json:"legacy_artifact"`
LogQueue LogQueueStatus `json:"log_delivery_queue"`
HistoryBackfill masterhistorybackfill.Status `json:"history_backfill"`
}
type SystemInfo ¶
type SystemInfo struct {
Version string `json:"version"`
GoVersion string `json:"go_version"`
StartTime int64 `json:"start_time"`
UptimeSec int64 `json:"uptime_sec"`
MemoryAlloc uint64 `json:"memory_alloc"`
MemorySys uint64 `json:"memory_sys"`
NumGC uint32 `json:"num_gc"`
NumGoroutine int `json:"num_goroutine"`
OnlineAgents int `json:"online_agents"`
}