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.
Click to show internal directories.
Click to hide internal directories.