@@ -29,6 +29,11 @@ import (
29
29
//
30
30
// The most commonly used Registry functions are for refreshing the
31
31
// registry and injecting CDI devices into an OCI Spec.
32
+ //
33
+ // Deprecated: Registry is deprecated and will be removed in a future
34
+ // version. Please update your code to use the corresponding package-
35
+ // level functions Configure(), Refresh(), InjectDevices(), GetErrors(),
36
+ // and GetDefaultCache().
32
37
type Registry interface {
33
38
RegistryResolver
34
39
RegistryRefresher
@@ -54,6 +59,10 @@ type Registry interface {
54
59
//
55
60
// GetSpecDirErrors returns any errors related to the configured
56
61
// Spec directories.
62
+ //
63
+ // Deprecated: RegistryRefresher is deprecated and will be removed
64
+ // in a future version. Please use the default cache and its related
65
+ // package-level functions instead.
57
66
type RegistryRefresher interface {
58
67
Configure (... Option ) error
59
68
Refresh () error
@@ -68,6 +77,10 @@ type RegistryRefresher interface {
68
77
// InjectDevices takes an OCI Spec and injects into it a set of
69
78
// CDI devices given by qualified name. It returns the names of
70
79
// any unresolved devices and an error if injection fails.
80
+ //
81
+ // Deprecated: RegistryRefresher is deprecated and will be removed
82
+ // in a future version. Please use the default cache and its related
83
+ // package-level functions instead.
71
84
type RegistryResolver interface {
72
85
InjectDevices (spec * oci.Spec , device ... string ) (unresolved []string , err error )
73
86
}
@@ -79,6 +92,12 @@ type RegistryResolver interface {
79
92
//
80
93
// ListDevices returns a slice with the names of qualified device
81
94
// known. The returned slice is sorted.
95
+ //
96
+ // Deprecated: RegistryDeviceDB is deprecated and will be removed
97
+ // in a future version. Please use the default cache and its related
98
+ // package-level functions instead.
99
+ // and will be removed in a future version. Please use the default
100
+ // cache and its related package-level functions instead.
82
101
type RegistryDeviceDB interface {
83
102
GetDevice (device string ) * Device
84
103
ListDevices () []string
@@ -99,6 +118,10 @@ type RegistryDeviceDB interface {
99
118
//
100
119
// WriteSpec writes the Spec with the given content and name to the
101
120
// last Spec directory.
121
+ //
122
+ // Deprecated: RegistrySpecDB is deprecated and will be removed
123
+ // in a future version. Please use the default cache and its related
124
+ // package-level functions instead.
102
125
type RegistrySpecDB interface {
103
126
ListVendors () []string
104
127
ListClasses () []string
@@ -121,6 +144,10 @@ var (
121
144
122
145
// GetRegistry returns the CDI registry. If any options are given, those
123
146
// are applied to the registry.
147
+ //
148
+ // Deprecated: GetRegistry is deprecated and will be removed in a future
149
+ // version. Please use the default cache and its related package-level
150
+ // functions instead.
124
151
func GetRegistry (options ... Option ) Registry {
125
152
initOnce .Do (func () {
126
153
reg = & registry {GetDefaultCache ()}
@@ -133,11 +160,19 @@ func GetRegistry(options ...Option) Registry {
133
160
}
134
161
135
162
// DeviceDB returns the registry interface for querying devices.
163
+ //
164
+ // Deprecated: DeviceDB is deprecated and will be removed in a future
165
+ // version. Please use the default cache and its related package-level
166
+ // functions instead.
136
167
func (r * registry ) DeviceDB () RegistryDeviceDB {
137
168
return r
138
169
}
139
170
140
171
// SpecDB returns the registry interface for querying Specs.
172
+ //
173
+ // Deprecated: SpecDB is deprecated and will be removed in a future
174
+ // version. Please use the default cache and its related package-level
175
+ // functions instead.
141
176
func (r * registry ) SpecDB () RegistrySpecDB {
142
177
return r
143
178
}
0 commit comments