Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunEndToEndTest ¶
func RunEndToEndTest(ctx context.Context, t *testing.T, exp *otlplogs.Exporter, logsCollector LogsCollector)
RunEndToEndTest can be used by otlplogs.Client tests to validate themselves.
func RunExporterShutdownTest ¶
func SingleReadableLogRecord ¶
func SingleReadableLogRecord() []logssdk.ReadableLogRecord
Types ¶
type LogsCollector ¶
type LogsCollector interface { Stop() error GetResourceLogs() []*logspb.ResourceLogs }
LogsCollector mocks a collector for the end-to-end testing.
type LogsStorage ¶
type LogsStorage struct {
// contains filtered or unexported fields
}
LogsStorage stores the Logs. Mock collectors can use it to store logs they have received.
func (*LogsStorage) AddLogs ¶
func (s *LogsStorage) AddLogs(request *collectorlogspb.ExportLogsServiceRequest)
AddLogs adds logs to the logs storage.
func (*LogsStorage) GetLogRecords ¶
func (s *LogsStorage) GetLogRecords() []*logspb.LogRecord
GetLogRecords returns the stored logs.
func (*LogsStorage) GetResourceLogs ¶
func (s *LogsStorage) GetResourceLogs() []*logspb.ResourceLogs
GetResourceLogs returns the stored resource logs.
Click to show internal directories.
Click to hide internal directories.