Documentation
¶
Index ¶
- Constants
- func AssertAttributeNotInSet(t *testing.T, set attribute.Set, attr attribute.KeyValue)
- func ConfigureAuth(t *testing.T) ([]authentication.Authenticator, *jwks.Server)
- func ConfigureAuthWithJwksConfig(t *testing.T, jwksConfig []authentication.JWKSConfig) []authentication.Authenticator
- func GetMetricByName(scopeMetric *metricdata.ScopeMetrics, name string) *metricdata.Metrics
- func GetMetricScopeByName(metrics []metricdata.ScopeMetrics, name string) *metricdata.ScopeMetrics
- func HasDataPointWithAttribute[N int64 | float64](dataPoints []metricdata.DataPoint[N], attr attribute.KeyValue) bool
- func HasHistogramDataPointWithAttribute[N int64 | float64](dataPoints []metricdata.HistogramDataPoint[N], attr attribute.KeyValue) bool
- func NewContextWithCancel(t *testing.T) context.Context
- func RequireSpanWithName(t *testing.T, exporter *tracetest2.InMemoryExporter, name string) trace.ReadOnlySpan
- func ToPtr[T any](v T) *T
Constants ¶
View Source
const ( JwksName = "my-jwks-server" EmployeesIDData = `{"data":{"employees":[{"id":1},{"id":2},{"id":3},{"id":4},{"id":5},{"id":7},{"id":8},{"id":10},{"id":11},{"id":12}]}}` )
Variables ¶
This section is empty.
Functions ¶
func AssertAttributeNotInSet ¶
func ConfigureAuth ¶
func ConfigureAuth(t *testing.T) ([]authentication.Authenticator, *jwks.Server)
func ConfigureAuthWithJwksConfig ¶
func ConfigureAuthWithJwksConfig(t *testing.T, jwksConfig []authentication.JWKSConfig) []authentication.Authenticator
func GetMetricByName ¶
func GetMetricByName(scopeMetric *metricdata.ScopeMetrics, name string) *metricdata.Metrics
func GetMetricScopeByName ¶
func GetMetricScopeByName(metrics []metricdata.ScopeMetrics, name string) *metricdata.ScopeMetrics
func HasDataPointWithAttribute ¶
func HasDataPointWithAttribute[N int64 | float64](dataPoints []metricdata.DataPoint[N], attr attribute.KeyValue) bool
HasDataPointWithAttribute checks if any data point in a Sum or Gauge metric has the given attribute.
func HasHistogramDataPointWithAttribute ¶
func HasHistogramDataPointWithAttribute[N int64 | float64](dataPoints []metricdata.HistogramDataPoint[N], attr attribute.KeyValue) bool
HasHistogramDataPointWithAttribute checks if any data point in a Histogram metric has the given attribute.
func NewContextWithCancel ¶
NewContextWithCancel creates a new context with a cancel function that is called when the test is done.
func RequireSpanWithName ¶
func RequireSpanWithName(t *testing.T, exporter *tracetest2.InMemoryExporter, name string) trace.ReadOnlySpan
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.