controller-runtime: sigs.k8s.io/controller-runtime/pkg/runtime/inject Index | Files

package inject

import "sigs.k8s.io/controller-runtime/pkg/runtime/inject"

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

Package Files

doc.go inject.go

func APIReaderInto Uses

func APIReaderInto(reader client.Reader, i interface{}) (bool, error)

APIReaderInto will set APIReader on i and return the result if it implements APIReaderInto. Returns false if i does not implement APIReader

func CacheInto Uses

func CacheInto(c cache.Cache, i interface{}) (bool, error)

CacheInto will set informers on i and return the result if it implements Cache. Returns // false if i does not implement Cache.

func ClientInto Uses

func ClientInto(client client.Client, i interface{}) (bool, error)

ClientInto will set client on i and return the result if it implements Client. Returns false if i does not implement Client.

func ConfigInto Uses

func ConfigInto(config *rest.Config, i interface{}) (bool, error)

ConfigInto will set config on i and return the result if it implements Config. Returns // false if i does not implement Config.

func InjectorInto Uses

func InjectorInto(f Func, i interface{}) (bool, error)

InjectorInto will set f and return the result on i if it implements Injector. Returns false if i does not implement Injector.

func LoggerInto Uses

func LoggerInto(l logr.Logger, i interface{}) (bool, error)

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 Uses

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 Uses

func SchemeInto(scheme *runtime.Scheme, i interface{}) (bool, error)

SchemeInto will set scheme and return the result on i if it implements Scheme. Returns false if i does not implement Scheme.

func StopChannelInto Uses

func StopChannelInto(stop <-chan struct{}, i interface{}) (bool, error)

StopChannelInto will set stop channel on i and return the result if it implements Stoppable. Returns false if i does not implement Stoppable.

type APIReader Uses

type APIReader interface {
    InjectAPIReader(client.Reader) error
}

APIReader is used by the Manager to inject the APIReader into necessary types.

type Cache Uses

type Cache interface {
    InjectCache(cache cache.Cache) error
}

Cache is used by the ControllerManager to inject Cache into Sources, EventHandlers, Predicates, and Reconciles

type Client Uses

type Client interface {
    InjectClient(client.Client) error
}

Client is used by the ControllerManager to inject client into Sources, EventHandlers, Predicates, and Reconciles

type Config Uses

type Config interface {
    InjectConfig(*rest.Config) error
}

Config is used by the ControllerManager to inject Config into Sources, EventHandlers, Predicates, and Reconciles

type Func Uses

type Func func(i interface{}) error

Func injects dependencies into i.

type Injector Uses

type Injector interface {
    InjectFunc(f Func) error
}

Injector is used by the ControllerManager to inject Func into Controllers

type Logger Uses

type Logger interface {
    InjectLogger(l logr.Logger) error
}

Logger is used to inject Loggers into components that need them and don't otherwise have opinions.

type Mapper Uses

type Mapper interface {
    InjectMapper(meta.RESTMapper) error
}

Mapper is used to inject the rest mapper to components that may need it

type Scheme Uses

type Scheme interface {
    InjectScheme(scheme *runtime.Scheme) error
}

Scheme is used by the ControllerManager to inject Scheme into Sources, EventHandlers, Predicates, and Reconciles

type Stoppable Uses

type Stoppable interface {
    InjectStopChannel(<-chan struct{}) error
}

Stoppable is used by the ControllerManager to inject stop channel into Sources, EventHandlers, Predicates, and Reconciles.

Package inject imports 6 packages (graph) and is imported by 73 packages. Updated 2019-07-11. Refresh now. Tools for package owners.