Versions in this module Expand all Collapse all v3 v3.0.0 Apr 8, 2024 Changes in this version + const RingKey + const ShardLbName + const ShardLbPlaceholder + var ErrEntriesExist = errors.New("duplicate push - entries already exist") + var ErrIntOverflowCheckpoint = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthCheckpoint = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrReadOnly = errors.New("Ingester is shutting down") + func RecoverCheckpoint(reader WALReader, recoverer Recoverer) error + func RecoverWAL(ctx context.Context, reader WALReader, recoverer Recoverer) error + type CheckpointWriter interface + Advance func() (noop bool, err error) + Close func(abort bool) error + Write func(*Series) error + type Checkpointer struct + func NewCheckpointer(dur time.Duration, iter SeriesIter, writer CheckpointWriter, ...) *Checkpointer + func (c *Checkpointer) PerformCheckpoint() (err error) + func (c *Checkpointer) Run() + type Chunk struct + Closed bool + Data []byte + FlushedAt time.Time + From time.Time + Head []byte + LastUpdated time.Time + Synced bool + To time.Time + func (*Chunk) Descriptor() ([]byte, []int) + func (*Chunk) ProtoMessage() + func (m *Chunk) GetClosed() bool + func (m *Chunk) GetData() []byte + func (m *Chunk) GetFlushedAt() time.Time + func (m *Chunk) GetFrom() time.Time + func (m *Chunk) GetHead() []byte + func (m *Chunk) GetLastUpdated() time.Time + func (m *Chunk) GetSynced() bool + func (m *Chunk) GetTo() time.Time + func (m *Chunk) Marshal() (dAtA []byte, err error) + func (m *Chunk) MarshalTo(dAtA []byte) (int, error) + func (m *Chunk) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *Chunk) Reset() + func (m *Chunk) Size() (n int) + func (m *Chunk) Unmarshal(dAtA []byte) error + func (m *Chunk) XXX_DiscardUnknown() + func (m *Chunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Chunk) XXX_Merge(src proto.Message) + func (m *Chunk) XXX_Size() int + func (m *Chunk) XXX_Unmarshal(b []byte) error + func (this *Chunk) Equal(that interface{}) bool + func (this *Chunk) GoString() string + func (this *Chunk) String() string + type Config struct + AutoForgetUnhealthy bool + BlockSize int + ChunkEncoding string + ChunkFilterer chunk.RequestChunkFilterer + ConcurrentFlushes int + FlushCheckPeriod time.Duration + FlushOpTimeout time.Duration + IndexShards int + LifecyclerConfig ring.LifecyclerConfig + MaxChunkAge time.Duration + MaxChunkIdle time.Duration + MaxDroppedStreams int + MaxReturnedErrors int + PipelineWrapper lokilog.PipelineWrapper + QueryStore bool + QueryStoreMaxLookBackPeriod time.Duration + RetainPeriod time.Duration + SampleExtractorWrapper lokilog.SampleExtractorWrapper + ShutdownMarkerPath string + SyncMinUtilization float64 + SyncPeriod time.Duration + TargetChunkSize int + WAL WALConfig + Wrapper Wrapper + func (cfg *Config) RegisterFlags(f *flag.FlagSet) + func (cfg *Config) Validate() error + type Flusher interface + Flush func() + type FpMapper struct + func NewFPMapper(fpToLabels func(fingerprint model.Fingerprint) labels.Labels) *FpMapper + func (m *FpMapper) MapFP(fp model.Fingerprint, metric labels.Labels) model.Fingerprint + type Ingester struct + func New(cfg Config, clientConfig client.Config, store Store, limits Limits, ...) (*Ingester, error) + func (*Ingester) Watch(*grpc_health_v1.HealthCheckRequest, grpc_health_v1.Health_WatchServer) error + func (i *Ingester) CheckReady(ctx context.Context) error + func (i *Ingester) Flush() + func (i *Ingester) FlushHandler(w http.ResponseWriter, _ *http.Request) + func (i *Ingester) GetChunkIDs(ctx context.Context, req *logproto.GetChunkIDsRequest) (*logproto.GetChunkIDsResponse, error) + func (i *Ingester) GetDetectedFields(_ context.Context, _ *logproto.DetectedFieldsRequest) (*logproto.DetectedFieldsResponse, error) + func (i *Ingester) GetDetectedLabels(ctx context.Context, req *logproto.DetectedLabelsRequest) (*logproto.LabelToValuesResponse, error) + func (i *Ingester) GetOrCreateInstance(instanceID string) (*instance, error) + func (i *Ingester) GetStats(ctx context.Context, req *logproto.IndexStatsRequest) (*logproto.IndexStatsResponse, error) + func (i *Ingester) GetStreamRates(ctx context.Context, _ *logproto.StreamRatesRequest) (*logproto.StreamRatesResponse, error) + func (i *Ingester) GetVolume(ctx context.Context, req *logproto.VolumeRequest) (*logproto.VolumeResponse, error) + func (i *Ingester) InitFlushQueues() + func (i *Ingester) Label(ctx context.Context, req *logproto.LabelRequest) (*logproto.LabelResponse, error) + func (i *Ingester) PrepareShutdown(w http.ResponseWriter, r *http.Request) + func (i *Ingester) Push(ctx context.Context, req *logproto.PushRequest) (*logproto.PushResponse, error) + func (i *Ingester) Query(req *logproto.QueryRequest, queryServer logproto.Querier_QueryServer) error + func (i *Ingester) QuerySample(req *logproto.SampleQueryRequest, ...) error + func (i *Ingester) Series(ctx context.Context, req *logproto.SeriesRequest) (*logproto.SeriesResponse, error) + func (i *Ingester) SetChunkFilterer(chunkFilter chunk.RequestChunkFilterer) + func (i *Ingester) SetExtractorWrapper(wrapper lokilog.SampleExtractorWrapper) + func (i *Ingester) SetPipelineWrapper(wrapper lokilog.PipelineWrapper) + func (i *Ingester) ShutdownHandler(w http.ResponseWriter, r *http.Request) + func (i *Ingester) Tail(req *logproto.TailRequest, queryServer logproto.Querier_TailServer) error + func (i *Ingester) TailersCount(ctx context.Context, _ *logproto.TailersCountRequest) (*logproto.TailersCountResponse, error) + func (i *Ingester) TransferOut(_ context.Context) error + type Interface interface + CheckReady func(ctx context.Context) error + FlushHandler func(w http.ResponseWriter, _ *http.Request) + GetOrCreateInstance func(instanceID string) (*instance, error) + PrepareShutdown func(w http.ResponseWriter, r *http.Request) + ShutdownHandler func(w http.ResponseWriter, r *http.Request) + type Limiter struct + func NewLimiter(limits Limits, metrics *ingesterMetrics, ring RingCount, replicationFactor int) *Limiter + func (l *Limiter) AssertMaxStreamsPerUser(userID string, streams int) error + func (l *Limiter) DisableForWALReplay() + func (l *Limiter) Enable() + func (l *Limiter) RateLimit(tenant string) validation.RateLimit + func (l *Limiter) UnorderedWrites(userID string) bool + type Limits interface + MaxGlobalStreamsPerUser func(userID string) int + MaxLocalStreamsPerUser func(userID string) int + PerStreamRateLimit func(userID string) validation.RateLimit + ShardStreams func(userID string) *shardstreams.Config + UnorderedWrites func(userID string) bool + type NoopWALReader struct + func (NoopWALReader) Close() error + func (NoopWALReader) Err() error + func (NoopWALReader) Next() bool + func (NoopWALReader) Record() []byte + type OnceSwitch struct + func (o *OnceSwitch) Get() bool + func (o *OnceSwitch) Trigger() + func (o *OnceSwitch) TriggerAnd(fn func()) + type QuerierQueryServer interface + Context func() context.Context + Send func(res *logproto.QueryResponse) error + type RateLimiterStrategy interface + RateLimit func(tenant string) validation.RateLimit + type Recoverer interface + Done func() <-chan struct{} + NumWorkers func() int + Push func(userID string, entries wal.RefEntries) error + Series func(series *Series) error + SetStream func(ctx context.Context, userID string, series record.RefSeries) error + type RingCount interface + HealthyInstancesCount func() int + type Series struct + Chunks []Chunk + EntryCt int64 + Fingerprint uint64 + HighestTs time.Time + Labels []github_com_grafana_loki_v3_pkg_logproto.LabelAdapter + LastLine string + To time.Time + UserID string + func (*Series) Descriptor() ([]byte, []int) + func (*Series) ProtoMessage() + func (m *Series) GetChunks() []Chunk + func (m *Series) GetEntryCt() int64 + func (m *Series) GetFingerprint() uint64 + func (m *Series) GetHighestTs() time.Time + func (m *Series) GetLastLine() string + func (m *Series) GetTo() time.Time + func (m *Series) GetUserID() string + func (m *Series) Marshal() (dAtA []byte, err error) + func (m *Series) MarshalTo(dAtA []byte) (int, error) + func (m *Series) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *Series) Reset() + func (m *Series) Size() (n int) + func (m *Series) Unmarshal(dAtA []byte) error + func (m *Series) XXX_DiscardUnknown() + func (m *Series) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Series) XXX_Merge(src proto.Message) + func (m *Series) XXX_Size() int + func (m *Series) XXX_Unmarshal(b []byte) error + func (this *Series) Equal(that interface{}) bool + func (this *Series) GoString() string + func (this *Series) String() string + type SeriesIter interface + Count func() int + Iter func() *streamIterator + Stop func() + type SeriesWithErr struct + Err error + Series *Series + type Store interface + type StreamRateCalculator struct + func NewStreamRateCalculator() *StreamRateCalculator + func (c *StreamRateCalculator) Rates() []logproto.StreamRate + func (c *StreamRateCalculator) Record(tenant string, streamHash, streamHashNoShard uint64, bytes int) + func (c *StreamRateCalculator) Stop() + type StreamRateLimiter struct + func NewStreamRateLimiter(strategy RateLimiterStrategy, tenant string, recheckPeriod time.Duration) *StreamRateLimiter + func (l *StreamRateLimiter) AllowN(at time.Time, n int) bool + type TailServer interface + Context func() context.Context + Send func(*logproto.TailResponse) error + type UniqueValues map[string]struct + type WAL interface + Log func(*wal.Record) error + Start func() + Stop func() error + type WALCheckpointWriter struct + func (w *WALCheckpointWriter) Advance() (bool, error) + func (w *WALCheckpointWriter) Close(abort bool) error + func (w *WALCheckpointWriter) Write(s *Series) error + type WALConfig struct + CheckpointDuration time.Duration + Dir string + Enabled bool + FlushOnShutdown bool + ReplayMemoryCeiling flagext.ByteSize + func (cfg *WALConfig) RegisterFlags(f *flag.FlagSet) + func (cfg *WALConfig) Validate() error + type WALReader interface + Err func() error + Next func() bool + Record func() []byte + type Wrapper interface + Wrap func(wrapped Interface) Interface Other modules containing this package github.com/grafana/loki