Source File
async.go
Belonging Package
go.opentelemetry.io/otel/api/metric
package metric
import (
)
type Int64ObserverFunc func(context.Context, Int64ObserverResult)
type Float64ObserverFunc func(context.Context, Float64ObserverResult)
type BatchObserverFunc func(context.Context, BatchObserverResult)
type Int64ObserverResult struct {
instrument AsyncImpl
function func([]label.KeyValue, ...Observation)
}
type Float64ObserverResult struct {
instrument AsyncImpl
function func([]label.KeyValue, ...Observation)
}
type BatchObserverResult struct {
function func([]label.KeyValue, ...Observation)
}
func ( Int64ObserverResult) ( int64, ...label.KeyValue) {
.function(, Observation{
instrument: .instrument,
number: NewInt64Number(),
})
}
func ( Float64ObserverResult) ( float64, ...label.KeyValue) {
.function(, Observation{
instrument: .instrument,
number: NewFloat64Number(),
})
}
func ( BatchObserverResult) ( []label.KeyValue, ...Observation) {
.function(, ...)
}
AnyRunner()
}
Run(ctx context.Context, single AsyncImpl, capture func([]label.KeyValue, ...Observation))
AsyncRunner
}
Run(ctx context.Context, capture func([]label.KeyValue, ...Observation))
AsyncRunner
}
var _ AsyncSingleRunner = (*Int64ObserverFunc)(nil)
var _ AsyncSingleRunner = (*Float64ObserverFunc)(nil)
var _ AsyncBatchRunner = (*BatchObserverFunc)(nil)
func ( Int64ObserverFunc) AsyncSingleRunner {
return &
}
func ( Float64ObserverFunc) AsyncSingleRunner {
return &
}
func ( BatchObserverFunc) AsyncBatchRunner {
return &
}
func (*Int64ObserverFunc) () {}
func (*Float64ObserverFunc) () {}
func (*BatchObserverFunc) () {}
func ( *Int64ObserverFunc) ( context.Context, AsyncImpl, func([]label.KeyValue, ...Observation)) {
(*)(, Int64ObserverResult{
instrument: ,
function: ,
})
}
func ( *Float64ObserverFunc) ( context.Context, AsyncImpl, func([]label.KeyValue, ...Observation)) {
(*)(, Float64ObserverResult{
instrument: ,
function: ,
})
}
func ( *BatchObserverFunc) ( context.Context, func([]label.KeyValue, ...Observation)) {
(*)(, BatchObserverResult{
function: ,
})
}
func ( AsyncImpl, error) (Int64ValueObserver, error) {
, := checkNewAsync(, )
return Int64ValueObserver{asyncInstrument: },
}
func ( AsyncImpl, error) (Float64ValueObserver, error) {
, := checkNewAsync(, )
return Float64ValueObserver{asyncInstrument: },
}
func ( AsyncImpl, error) (Int64SumObserver, error) {
, := checkNewAsync(, )
return Int64SumObserver{asyncInstrument: },
}
func ( AsyncImpl, error) (Float64SumObserver, error) {
, := checkNewAsync(, )
return Float64SumObserver{asyncInstrument: },
}
func ( AsyncImpl, error) (Int64UpDownSumObserver, error) {
, := checkNewAsync(, )
return Int64UpDownSumObserver{asyncInstrument: },
}
func ( AsyncImpl, error) (Float64UpDownSumObserver, error) {
, := checkNewAsync(, )
return Float64UpDownSumObserver{asyncInstrument: },
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |