Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NewProducerFromRestConfig = func(config *rest.Config) (Producer, error) { var err error p := &DefaultProducer{} p.KubeClient, err = kubernetes.NewForConfig(config) if err != nil { return nil, errors.Wrap(err, "error creating kube client") } p.DynamicClient, err = dynamic.NewForConfig(config) if err != nil { return nil, errors.Wrap(err, "error creating dynamic client") } p.GeneralClient, err = client.New(config, client.Options{}) if err != nil { return nil, errors.Wrap(err, "error creating controller client") } return p, nil }
Functions ¶
This section is empty.
Types ¶
type DefaultProducer ¶
type DefaultProducer struct { KubeClient kubernetes.Interface DynamicClient dynamic.Interface GeneralClient client.Client }
func (*DefaultProducer) ForDynamic ¶
func (p *DefaultProducer) ForDynamic() dynamic.Interface
func (*DefaultProducer) ForGeneral ¶
func (p *DefaultProducer) ForGeneral() client.Client
func (*DefaultProducer) ForKubernetes ¶
func (p *DefaultProducer) ForKubernetes() kubernetes.Interface
type Producer ¶
type Producer interface { // This is a general client that can be used for any resource type and for most operations. ForGeneral() client.Client // This is needed for operations that aren't supported by the general client (eg, accessing subresources like pod logs). ForKubernetes() kubernetes.Interface // While the general client supports Unstructured, this client provides a direct API via GVR which may be easier or // preferable in some cases. ForDynamic() dynamic.Interface }
Click to show internal directories.
Click to hide internal directories.