Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachedStats ¶ added in v0.9.0
CachedStats represents a cached statistics entry with expiration time.
type InMemoryStatsCache ¶ added in v0.9.0
type InMemoryStatsCache struct {
// contains filtered or unexported fields
}
InMemoryStatsCache implements TTL-based in-memory caching for statistics. It provides thread-safe access and lazy cleanup of expired entries.
func NewInMemoryStatsCache ¶ added in v0.9.0
func NewInMemoryStatsCache(ttl time.Duration) *InMemoryStatsCache
NewInMemoryStatsCache creates a new in-memory cache instance.
type NoOpStatsCache ¶ added in v0.9.0
type NoOpStatsCache struct{}
NoOpStatsCache is a no-operation implementation that never caches. Used when caching is disabled via configuration.
type TimePeriodFactory ¶
type TimePeriodFactory struct {
// contains filtered or unexported fields
}
TimePeriodFactory implements PeriodFactory using timezone-aware calculations
func NewTimePeriodFactory ¶
func NewTimePeriodFactory(timezone *time.Location) *TimePeriodFactory
NewTimePeriodFactory creates a new TimePeriodFactory with the given timezone
func (*TimePeriodFactory) CreateDaily ¶
func (f *TimePeriodFactory) CreateDaily() entity.Period
CreateDaily creates a period for today using timezone-aware boundaries
func (*TimePeriodFactory) CreateMonthly ¶
func (f *TimePeriodFactory) CreateMonthly() entity.Period
CreateMonthly creates a period for current month using timezone-aware boundaries