mirror of https://github.com/k3s-io/k3s
21 lines
445 B
Go
21 lines
445 B
Go
package schemes
|
|
|
|
import (
|
|
"github.com/rancher/lasso/pkg/scheme"
|
|
"k8s.io/apimachinery/pkg/runtime"
|
|
)
|
|
|
|
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)
|
|
}
|