utils

package
v2.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2023 License: AGPL-3.0 Imports: 9 Imported by: 0

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 FanoutEntryHandler

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

FanoutEntryHandler implements api.EntryHandler, fanning out received entries to one or multiple channels.

func NewFanoutEntryHandler

func NewFanoutEntryHandler(sendTimeoutOnStop time.Duration, handlers ...api.EntryHandler) *FanoutEntryHandler

NewFanoutEntryHandler creates a new FanoutEntryHandler.

func (*FanoutEntryHandler) Chan

func (eh *FanoutEntryHandler) Chan() chan<- api.Entry

func (*FanoutEntryHandler) Stop

func (eh *FanoutEntryHandler) Stop()

Stop only stops the channel FanoutEntryHandler exposes. It then waits for the entry being processed to be sent successfully. If it times out, it hard stops all sending routines.

type RemoteWriteRequest

type RemoteWriteRequest struct {
	TenantID string
	Request  logproto.PushRequest
}

RemoteWriteRequest wraps the received logs remote write request that is received.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL