inject

package
v0.1.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheInto

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

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

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 DecoderInto

func DecoderInto(decoder types.Decoder, i interface{}) (bool, error)

DecoderInto will set decoder on i and return the result if it implements Decoder. Returns false if i does not implement Decoder.

func InjectorInto

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 SchemeInto

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

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.

Types

type Cache

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

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

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

type Config

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

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

type Decoder

type Decoder interface {
	InjectDecoder(types.Decoder) error
}

Decoder is used by the ControllerManager to inject decoder into webhook handlers.

type Func

type Func func(i interface{}) error

Func injects dependencies into i.

type Injector

type Injector interface {
	InjectFunc(f Func) error
}

Injector is used by the ControllerManager to inject Func into Controllers

type Scheme

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

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL