s3-orchestrator

dashboard

import "github.com/afreidah/s3-orchestrator/internal/proxy/dashboard"

Package dashboard owns the read-only stats aggregation that the web UI renders. The proxy package wraps Aggregator results with cluster-state enrichment (drain progress, breaker health) before returning them to HTTP handlers.

Index

type Aggregator

Aggregator queries the metadata store and usage tracker to build snapshots for the web UI.

type Aggregator struct {
    // contains filtered or unexported fields
}

func New

func New(store core.DashboardStore, usage *counter.UsageTracker, order []string) *Aggregator

New creates an Aggregator.

func (*Aggregator) GetData

func (da *Aggregator) GetData(ctx context.Context) (*Data, error)

GetData fetches all stats needed for the web UI in one call.

func (*Aggregator) GetDirectoryChildren

func (da *Aggregator) GetDirectoryChildren(ctx context.Context, prefix, startAfter string, maxKeys int) (*core.DirectoryListResult, error)

GetDirectoryChildren returns the immediate children of a directory path for the lazy-loaded file browser.

type Data

Data holds a snapshot of all operational data for the dashboard.

type Data struct {
    BackendOrder []string
    QuotaStats   map[string]core.QuotaStat
    ObjectCounts map[string]int64
    // UnverifiedObjectCounts is per-backend count of objects with a
    // NULL content_hash (objects that predate integrity verification or
    // otherwise have not been checksummed). Drives the dashboard's
    // "needs backfill" column when integrity is enabled. See #405.
    UnverifiedObjectCounts map[string]int64
    ActiveMultipartCounts  map[string]int64
    UsageStats             map[string]core.UsageStat
    UsageLimits            map[string]core.UsageLimits
    UsagePeriod            string
    TopLevelEntries        *core.DirectoryListResult
    DrainingBackends       map[string]drain.Progress
    UnhealthyBackends      map[string]bool
}

Generated by gomarkdoc