-
Notifications
You must be signed in to change notification settings - Fork 9
/
deps.fn.go
54 lines (45 loc) · 1.5 KB
/
deps.fn.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// This file was automatically generated by Namespace.
// DO NOT EDIT. To update, re-run `ns generate`.
package lightstep
import (
"context"
"namespacelabs.dev/foundation/std/go/core"
"namespacelabs.dev/foundation/std/monitoring/tracing"
)
// Dependencies that are instantiated once for the lifetime of the extension.
type ExtensionDeps struct {
OpenTelemetry tracing.Exporter
}
var (
Package__v8ttgu = &core.Package{
PackageName: "namespacelabs.dev/foundation/universe/monitoring/lightstep",
}
Provider__v8ttgu = core.Provider{
Package: Package__v8ttgu,
Instantiate: makeDeps__v8ttgu,
}
Initializers__v8ttgu = []*core.Initializer{
{
Package: Package__v8ttgu,
Before: []string{"namespacelabs.dev/foundation/std/monitoring/tracing"},
Do: func(ctx context.Context, di core.Dependencies) error {
return di.Instantiate(ctx, Provider__v8ttgu, func(ctx context.Context, v interface{}) error {
return Prepare(ctx, v.(ExtensionDeps))
})
},
},
}
)
func makeDeps__v8ttgu(ctx context.Context, di core.Dependencies) (_ interface{}, err error) {
var deps ExtensionDeps
if err := di.Instantiate(ctx, tracing.Provider__70o2mm, func(ctx context.Context, v interface{}) (err error) {
// name: "lightstep"
if deps.OpenTelemetry, err = tracing.ProvideExporter(ctx, core.MustUnwrapProto("CglsaWdodHN0ZXA=", &tracing.ExporterArgs{}).(*tracing.ExporterArgs), v.(tracing.ExtensionDeps)); err != nil {
return err
}
return nil
}); err != nil {
return nil, err
}
return deps, nil
}