-
Notifications
You must be signed in to change notification settings - Fork 9
/
deps.fn.go
51 lines (40 loc) · 1.38 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
// This file was automatically generated by Namespace.
// DO NOT EDIT. To update, re-run `ns generate`.
package base
import (
"context"
fncore "namespacelabs.dev/foundation/std/core"
"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.DeferredTracerProvider
ReadinessCheck core.Check
}
type _checkProvideWireDatabase func(context.Context, *WireDatabaseArgs, ExtensionDeps) (WireDatabase, error)
var _ _checkProvideWireDatabase = ProvideWireDatabase
var (
Package__26debk = &core.Package{
PackageName: "namespacelabs.dev/foundation/universe/db/postgres/internal/base",
}
Provider__26debk = core.Provider{
Package: Package__26debk,
Instantiate: makeDeps__26debk,
}
)
func makeDeps__26debk(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) {
if deps.OpenTelemetry, err = tracing.ProvideTracerProvider(ctx, nil, v.(tracing.ExtensionDeps)); err != nil {
return err
}
return nil
}); err != nil {
return nil, err
}
if deps.ReadinessCheck, err = fncore.ProvideReadinessCheck(ctx, nil); err != nil {
return nil, err
}
return deps, nil
}