Documentation ¶
Index ¶
- type Labels
- type LogsCountResponse
- type MetadataFilters
- type MetricCounts
- type MetricSample
- type MetricsSamplesByTime
- type Span
- type SpanId
- type SumologicMockClient
- func (client *SumologicMockClient) GetLogsCount(t *testing.T, metadataFilters MetadataFilters) (uint, error)
- func (client *SumologicMockClient) GetMetricCounts(t *testing.T) (MetricCounts, error)
- func (client *SumologicMockClient) GetMetricsSamples(metadataFilters MetadataFilters) ([]MetricSample, error)
- func (client *SumologicMockClient) GetSpansCount(t *testing.T, metadataFilters MetadataFilters) (uint, error)
- func (client *SumologicMockClient) GetTracesCounts(t *testing.T, metadataFilters MetadataFilters) ([]uint, error)
- type TraceId
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Labels ¶
Labels represent a key value mapping of labels names and their values. An empty label value indicates that we're interested in a label being present but we don't care about it's value.
func (Labels) DiffLabelNames ¶
func (labels Labels) DiffLabelNames(requested Labels, skipRegex *regexp.Regexp) (extra []string, missing []string)
DiffLabelNames calculates the difference in label names between the two label sets. It returns two slices of strings: the names of labels from origin not in `requested`, and the names of labels from requested not in origin
func (Labels) MatchAll ¶
MatchAll matches returns whether all the requested labels are present and (if a corresponding value has been provided) that all values match matching is done via regex if the value is a valid regex, otherwise via strict equality the special value "" matches everything for historical reasons
type LogsCountResponse ¶
type LogsCountResponse struct {
Count uint
}
type MetadataFilters ¶
type MetricCounts ¶
Mapping of metric names to the number of times the metric was observed
type MetricSample ¶
type MetricsSamplesByTime ¶
type MetricsSamplesByTime []MetricSample
func (MetricsSamplesByTime) Len ¶
func (m MetricsSamplesByTime) Len() int
func (MetricsSamplesByTime) Less ¶
func (m MetricsSamplesByTime) Less(i, j int) bool
func (MetricsSamplesByTime) Swap ¶
func (m MetricsSamplesByTime) Swap(i, j int)
type SumologicMockClient ¶
type SumologicMockClient struct {
// contains filtered or unexported fields
}
A HTTP client for the sumologic-mock API
func NewClientWithK8sTunnel ¶
func NewClientWithK8sTunnel( ctx context.Context, envConf *envconf.Config, t *testing.T, serviceName string, ) (*SumologicMockClient, func())
NewClientWithK8sTunnel creates a client for sumologic-mock. It return the client itself and a tunnel teardown func which should be called by the caller when they're done with it.
func (*SumologicMockClient) GetLogsCount ¶
func (client *SumologicMockClient) GetLogsCount(t *testing.T, metadataFilters MetadataFilters) (uint, error)
GetLogsCount returns the numbers of logs received by sumologic-mock that pass the provided metadata filter. Note that in the filter semantics, empty strings match any value
func (*SumologicMockClient) GetMetricCounts ¶
func (client *SumologicMockClient) GetMetricCounts(t *testing.T) (MetricCounts, error)
GetMetricCounts returns the number of times each metric was received by sumologic-mock
func (*SumologicMockClient) GetMetricsSamples ¶
func (client *SumologicMockClient) GetMetricsSamples( metadataFilters MetadataFilters, ) ([]MetricSample, error)
GetMetricSamples returns metric samples received by sumologic-mock that pass the provided metadata filter. Note that in the filter semantics, empty strings match any value
func (*SumologicMockClient) GetSpansCount ¶
func (client *SumologicMockClient) GetSpansCount(t *testing.T, metadataFilters MetadataFilters) (uint, error)
func (*SumologicMockClient) GetTracesCounts ¶
func (client *SumologicMockClient) GetTracesCounts(t *testing.T, metadataFilters MetadataFilters) ([]uint, error)