Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRemoteWriteServer ¶
func NewRemoteWriteServer(receivedChan chan RemoteWriteRequest, status int) *httptest.Server
NewRemoteWriteServer creates and starts a new httpserver.Server that can handle remote write request. When a request is handled, the received entries are written to receivedChan, and status is responded.
Types ¶
type RemoteWriteRequest ¶
type RemoteWriteRequest struct { TenantID string Request logproto.PushRequest }
RemoteWriteRequest wraps the received logs remote write request that is received.
type SyncSlice ¶
type SyncSlice[T any] struct { // contains filtered or unexported fields }
SyncSlice is a concurrent slice implementation.
func NewSyncSlice ¶
func (*SyncSlice[T]) DoneIterate ¶
func (ss *SyncSlice[T]) DoneIterate()
DoneIterate releases the internal read-lock.
func (*SyncSlice[T]) Reset ¶
func (ss *SyncSlice[T]) Reset()
Reset resets the slice to have zero elements. If used during benchmarks, this will probably make new appends more efficient since the underlying array has more room.
func (*SyncSlice[T]) StartIterate ¶
func (ss *SyncSlice[T]) StartIterate() []T
StartIterate returns the internal slice, after read-locking the internal lock. Once the iteration is finished, DoneIterate should be called to release the lock.