1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-27 15:44:10 +00:00

Allow discovery of API clients

This commit is contained in:
Darren Shepherd
2019-01-11 16:55:37 -07:00
parent ad8537c903
commit 1fd5af67a4
5 changed files with 148 additions and 43 deletions

View File

@@ -1,21 +1,27 @@
package objectset
import (
"github.com/rancher/norman/objectclient"
"github.com/rancher/norman/pkg/objectset/injectors"
"github.com/rancher/norman/types"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/discovery"
"k8s.io/client-go/rest"
)
type DesiredSet struct {
remove bool
setID string
objs *ObjectSet
codeVersion string
clients map[schema.GroupVersionKind]Client
owner runtime.Object
injectors []injectors.ConfigInjector
errs []error
discoveredClients map[schema.GroupVersionKind]*objectclient.ObjectClient
discovery discovery.DiscoveryInterface
restConfig rest.Config
remove bool
setID string
objs *ObjectSet
codeVersion string
clients map[schema.GroupVersionKind]Client
owner runtime.Object
injectors []injectors.ConfigInjector
errs []error
}
func (o *DesiredSet) AddInjector(inj injectors.ConfigInjector) {