internal

package
v0.0.0-...-76a0d45 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FillTestByteSlice

func FillTestByteSlice(tv ByteSlice)

func FillTestFloat64Slice

func FillTestFloat64Slice(tv Float64Slice)

func FillTestInstrumentationScope

func FillTestInstrumentationScope(tv InstrumentationScope)

func FillTestInt64Slice

func FillTestInt64Slice(tv Int64Slice)

func FillTestMap

func FillTestMap(dest Map)

func FillTestResource

func FillTestResource(tv Resource)

func FillTestSlice

func FillTestSlice(tv Slice)

func FillTestStringSlice

func FillTestStringSlice(tv StringSlice)

func FillTestTraceState

func FillTestTraceState(dest TraceState)

func FillTestUInt64Slice

func FillTestUInt64Slice(tv UInt64Slice)

func FillTestValue

func FillTestValue(dest Value)

func GetOrigByteSlice

func GetOrigByteSlice(ms ByteSlice) *[]byte

func GetOrigFloat64Slice

func GetOrigFloat64Slice(ms Float64Slice) *[]float64

func GetOrigInt64Slice

func GetOrigInt64Slice(ms Int64Slice) *[]int64

func GetOrigMap

func GetOrigMap(ms Map) *[]*otlpcommon.KeyValue

func GetOrigResource

func GetOrigResource(ms Resource) *otlpresource.Resource

func GetOrigSlice

func GetOrigSlice(ms Slice) *[]*otlpcommon.AnyValue

func GetOrigStringSlice

func GetOrigStringSlice(ms StringSlice) *[]string

func GetOrigTraceState

func GetOrigTraceState(ms TraceState) *string

func GetOrigUInt64Slice

func GetOrigUInt64Slice(ms UInt64Slice) *[]uint64

func GetOrigValue

func GetOrigValue(ms Value) *otlpcommon.AnyValue

func LogsToProto

func LogsToProto(l Logs) otlplogs.LogsData

LogsToProto internal helper to convert Logs to protobuf representation.

func MetricsToProto

func MetricsToProto(l Metrics) otlpmetrics.MetricsData

MetricsToProto internal helper to convert Metrics to protobuf representation.

func SetLogsState

func SetLogsState(ms Logs, state State)

func SetMetricsState

func SetMetricsState(ms Metrics, state State)

func SetTracesState

func SetTracesState(ms Traces, state State)

func TracesToProto

func TracesToProto(l Traces) otlptrace.TracesData

TracesToProto internal helper to convert Traces to protobuf representation.

Types

type ByteSlice

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

func GenerateTestByteSlice

func GenerateTestByteSlice() ByteSlice

func NewByteSlice

func NewByteSlice(orig *[]byte, state *State) ByteSlice

type Float64Slice

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

func GenerateTestFloat64Slice

func GenerateTestFloat64Slice() Float64Slice

func NewFloat64Slice

func NewFloat64Slice(orig *[]float64, state *State) Float64Slice

type InstrumentationScope

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

func GenerateTestInstrumentationScope

func GenerateTestInstrumentationScope() InstrumentationScope

func NewInstrumentationScope

func NewInstrumentationScope(orig *otlpcommon.InstrumentationScope, state *State) InstrumentationScope

type Int64Slice

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

func GenerateTestInt64Slice

func GenerateTestInt64Slice() Int64Slice

func NewInt64Slice

func NewInt64Slice(orig *[]int64, state *State) Int64Slice

type Logs

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

func LogsFromProto

func LogsFromProto(orig otlplogs.LogsData) Logs

LogsFromProto internal helper to convert protobuf representation to Logs. This function set exclusive state assuming that it's called only once per Logs.

func NewLogs

func NewLogs(orig *otlpcollectorlog.ExportLogsServiceRequest, state *State) Logs

type Map

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

func GenerateTestMap

func GenerateTestMap() Map

func NewMap

func NewMap(orig *[]*otlpcommon.KeyValue, state *State) Map

type Metrics

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

func MetricsFromProto

func MetricsFromProto(orig otlpmetrics.MetricsData) Metrics

MetricsFromProto internal helper to convert protobuf representation to Metrics. This function set exclusive state assuming that it's called only once per Metrics.

type Resource

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

func GenerateTestResource

func GenerateTestResource() Resource

func NewResource

func NewResource(orig *otlpresource.Resource, state *State) Resource

type Slice

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

func GenerateTestSlice

func GenerateTestSlice() Slice

func NewSlice

func NewSlice(orig *[]*otlpcommon.AnyValue, state *State) Slice

type State

type State int32

State defines an ownership state of pmetric.Metrics, plog.Logs or ptrace.Traces.

const (
	// StateMutable indicates that the data is exclusive to the current consumer.
	StateMutable State = iota

	// StateReadOnly indicates that the data is shared with other consumers.
	StateReadOnly
)

func GetByteSliceState

func GetByteSliceState(ms ByteSlice) *State

func GetFloat64SliceState

func GetFloat64SliceState(ms Float64Slice) *State

func GetInstrumentationScopeState

func GetInstrumentationScopeState(ms InstrumentationScope) *State

func GetInt64SliceState

func GetInt64SliceState(ms Int64Slice) *State

func GetLogsState

func GetLogsState(ms Logs) *State

func GetMapState

func GetMapState(ms Map) *State

func GetMetricsState

func GetMetricsState(ms Metrics) *State

func GetResourceState

func GetResourceState(ms Resource) *State

func GetSliceState

func GetSliceState(ms Slice) *State

func GetStringSliceState

func GetStringSliceState(ms StringSlice) *State

func GetTraceStateState

func GetTraceStateState(ms TraceState) *State

func GetTracesState

func GetTracesState(ms Traces) *State

func GetUInt64SliceState

func GetUInt64SliceState(ms UInt64Slice) *State

func GetValueState

func GetValueState(ms Value) *State

func (*State) AssertMutable

func (state *State) AssertMutable()

AssertMutable panics if the state is not StateMutable.

type StringSlice

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

func GenerateTestStringSlice

func GenerateTestStringSlice() StringSlice

func NewStringSlice

func NewStringSlice(orig *[]string, state *State) StringSlice

type TraceState

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

func GenerateTestTraceState

func GenerateTestTraceState() TraceState

func NewTraceState

func NewTraceState(orig *string, state *State) TraceState

type Traces

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

func TracesFromProto

func TracesFromProto(orig otlptrace.TracesData) Traces

TracesFromProto internal helper to convert protobuf representation to Traces. This function set exclusive state assuming that it's called only once per Traces.

type UInt64Slice

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

func GenerateTestUInt64Slice

func GenerateTestUInt64Slice() UInt64Slice

func NewUInt64Slice

func NewUInt64Slice(orig *[]uint64, state *State) UInt64Slice

type Value

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

func GenerateTestValue

func GenerateTestValue() Value

func NewValue

func NewValue(orig *otlpcommon.AnyValue, state *State) Value

Jump to

Keyboard shortcuts

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