Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/pkg/limits/frontend/cache.go

18 lines
476 B

package frontend
import (
"time"
"github.com/jellydator/ttlcache/v3"
"github.com/grafana/loki/v3/pkg/logproto"
)
type PartitionConsumersCache = *ttlcache.Cache[string, logproto.GetAssignedPartitionsResponse]
func NewPartitionConsumerCache(ttl time.Duration) PartitionConsumersCache {
return ttlcache.New(
ttlcache.WithTTL[string, logproto.GetAssignedPartitionsResponse](ttl),
ttlcache.WithDisableTouchOnHit[string, logproto.GetAssignedPartitionsResponse](),
)
}