-
Notifications
You must be signed in to change notification settings - Fork 9
/
deps.fn.go
51 lines (40 loc) · 1.3 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 deadlines
import (
"context"
"namespacelabs.dev/foundation/std/go/core"
"namespacelabs.dev/foundation/std/go/grpc/interceptors"
)
// Dependencies that are instantiated once for the lifetime of the extension.
type ExtensionDeps struct {
Interceptors interceptors.Registration
}
type _checkProvideDeadlines func(context.Context, *Deadline, ExtensionDeps) (*DeadlineRegistration, error)
var _ _checkProvideDeadlines = ProvideDeadlines
var (
Package__vbko45 = &core.Package{
PackageName: "namespacelabs.dev/foundation/std/grpc/deadlines",
}
Provider__vbko45 = core.Provider{
Package: Package__vbko45,
Instantiate: makeDeps__vbko45,
}
Initializers__vbko45 = []*core.Initializer{
{
Package: Package__vbko45,
Do: func(ctx context.Context, di core.Dependencies) error {
return di.Instantiate(ctx, Provider__vbko45, func(ctx context.Context, v interface{}) error {
return Prepare(ctx, v.(ExtensionDeps))
})
},
},
}
)
func makeDeps__vbko45(ctx context.Context, di core.Dependencies) (_ interface{}, err error) {
var deps ExtensionDeps
if deps.Interceptors, err = interceptors.ProvideInterceptorRegistration(ctx, nil); err != nil {
return nil, err
}
return deps, nil
}