Documentation ¶
Overview ¶
Package inject defines interfaces and functions for propagating dependencies from a ControllerManager to the components registered with it. Dependencies are propagated to Reconciler, Source, EventHandler and Predicate objects which implement the Injectable interfaces.
Index ¶
- func APIReaderInto(reader client.Reader, i interface{}) (bool, error)
- func CacheInto(c cache.Cache, i interface{}) (bool, error)
- func ClientInto(client client.Client, i interface{}) (bool, error)
- func ConfigInto(config *rest.Config, i interface{}) (bool, error)
- func InjectorInto(f Func, i interface{}) (bool, error)
- func LoggerInto(l logr.Logger, i interface{}) (bool, error)
- func MapperInto(mapper meta.RESTMapper, i interface{}) (bool, error)
- func SchemeInto(scheme *runtime.Scheme, i interface{}) (bool, error)
- func StopChannelInto(stop <-chan struct{}, i interface{}) (bool, error)
- type APIReader
- type Cache
- type Client
- type Config
- type Func
- type Injector
- type Logger
- type Mapper
- type Scheme
- type Stoppable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIReaderInto ¶ added in v0.2.0
APIReaderInto will set APIReader on i and return the result if it implements APIReaderInto. Returns false if i does not implement APIReader
func CacheInto ¶
CacheInto will set informers on i and return the result if it implements Cache. Returns false if i does not implement Cache.
func ClientInto ¶
ClientInto will set client on i and return the result if it implements Client. Returns false if i does not implement Client.
func ConfigInto ¶
ConfigInto will set config on i and return the result if it implements Config. Returns false if i does not implement Config.
func InjectorInto ¶
InjectorInto will set f and return the result on i if it implements Injector. Returns false if i does not implement Injector.
func LoggerInto ¶ added in v0.2.0
LoggerInto will set the logger on the given object if it implements inject.Logger, returning true if a InjectLogger was called, and false otherwise.
func MapperInto ¶ added in v0.2.0
func MapperInto(mapper meta.RESTMapper, i interface{}) (bool, error)
MapperInto will set the rest mapper on i and return the result if it implements Mapper. Returns false if i does not implement Mapper.
func SchemeInto ¶
SchemeInto will set scheme and return the result on i if it implements Scheme. Returns false if i does not implement Scheme.
func StopChannelInto ¶
StopChannelInto will set stop channel on i and return the result if it implements Stoppable. Returns false if i does not implement Stoppable.
Types ¶
type APIReader ¶ added in v0.2.0
APIReader is used by the Manager to inject the APIReader into necessary types.
type Cache ¶
Cache is used by the ControllerManager to inject Cache into Sources, EventHandlers, Predicates, and Reconciles
type Client ¶
Client is used by the ControllerManager to inject client into Sources, EventHandlers, Predicates, and Reconciles
type Config ¶
Config is used by the ControllerManager to inject Config into Sources, EventHandlers, Predicates, and Reconciles
type Logger ¶ added in v0.2.0
Logger is used to inject Loggers into components that need them and don't otherwise have opinions.
type Mapper ¶ added in v0.2.0
type Mapper interface {
InjectMapper(meta.RESTMapper) error
}
Mapper is used to inject the rest mapper to components that may need it