@@ -29,6 +29,11 @@ import (
2929// 
3030// The most commonly used Registry functions are for refreshing the 
3131// 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(). 
3237type  Registry  interface  {
3338	RegistryResolver 
3439	RegistryRefresher 
@@ -54,6 +59,10 @@ type Registry interface {
5459// 
5560// GetSpecDirErrors returns any errors related to the configured 
5661// 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. 
5766type  RegistryRefresher  interface  {
5867	Configure (... Option ) error 
5968	Refresh () error 
@@ -68,6 +77,10 @@ type RegistryRefresher interface {
6877// InjectDevices takes an OCI Spec and injects into it a set of 
6978// CDI devices given by qualified name. It returns the names of 
7079// 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. 
7184type  RegistryResolver  interface  {
7285	InjectDevices (spec  * oci.Spec , device  ... string ) (unresolved  []string , err  error )
7386}
@@ -79,6 +92,12 @@ type RegistryResolver interface {
7992// 
8093// ListDevices returns a slice with the names of qualified device 
8194// 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. 
82101type  RegistryDeviceDB  interface  {
83102	GetDevice (device  string ) * Device 
84103	ListDevices () []string 
@@ -99,6 +118,10 @@ type RegistryDeviceDB interface {
99118// 
100119// WriteSpec writes the Spec with the given content and name to the 
101120// 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. 
102125type  RegistrySpecDB  interface  {
103126	ListVendors () []string 
104127	ListClasses () []string 
@@ -121,6 +144,10 @@ var (
121144
122145// GetRegistry returns the CDI registry. If any options are given, those 
123146// 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. 
124151func  GetRegistry (options  ... Option ) Registry  {
125152	initOnce .Do (func () {
126153		reg  =  & registry {GetDefaultCache ()}
@@ -133,11 +160,19 @@ func GetRegistry(options ...Option) Registry {
133160}
134161
135162// 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. 
136167func  (r  * registry ) DeviceDB () RegistryDeviceDB  {
137168	return  r 
138169}
139170
140171// 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. 
141176func  (r  * registry ) SpecDB () RegistrySpecDB  {
142177	return  r 
143178}
0 commit comments