2019-07-12 17:13:20 +00:00
|
|
|
package schemes
|
|
|
|
|
|
|
|
import (
|
2021-07-02 22:06:02 +00:00
|
|
|
"github.com/rancher/lasso/pkg/scheme"
|
2019-07-12 17:13:20 +00:00
|
|
|
"k8s.io/apimachinery/pkg/runtime"
|
|
|
|
)
|
|
|
|
|
2021-07-02 22:06:02 +00:00
|
|
|
var (
|
|
|
|
All = scheme.All
|
|
|
|
localSchemeBuilder = runtime.NewSchemeBuilder()
|
|
|
|
)
|
|
|
|
|
|
|
|
func Register(addToScheme func(*runtime.Scheme) error) error {
|
|
|
|
localSchemeBuilder = append(localSchemeBuilder, addToScheme)
|
|
|
|
return addToScheme(All)
|
|
|
|
}
|
|
|
|
|
|
|
|
func AddToScheme(scheme *runtime.Scheme) error {
|
|
|
|
return localSchemeBuilder.AddToScheme(scheme)
|
|
|
|
}
|