controller

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2017 License: Apache-2.0 Imports: 32 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// Separator between reference to a resource by name and JsonPath within a resource
	ReferenceSeparator = "#"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleController

type BundleController struct {
	BundleInf    cache.SharedIndexInformer
	BundleClient smithClient_v1.BundlesGetter
	BundleStore  BundleStore
	SmartClient  smith.SmartClient
	Rc           ReadyChecker
	Store        Store
	SpecCheck    SpecCheck
	// Bundle objects that need to be synced.
	Queue   workqueue.RateLimitingInterface
	Workers int

	// CRD
	CrdResyncPeriod time.Duration

	Namespace string

	Plugins map[smith_v1.PluginName]plugin.Plugin
	Scheme  *runtime.Scheme
	// contains filtered or unexported fields
}

func (*BundleController) Prepare added in v1.0.0

Prepare prepares the controller to be run.

func (*BundleController) Run

func (c *BundleController) Run(ctx context.Context)

Run begins watching and syncing. All informers must be synched before this method is invoked.

type BundleStore

type BundleStore interface {
	// Get returns Bundle based on its namespace and name.
	Get(namespace, bundleName string) (*smith_v1.Bundle, error)
	// GetBundlesByCrd returns Bundles which have a resource defined by CRD.
	GetBundlesByCrd(*apiext_v1b1.CustomResourceDefinition) ([]*smith_v1.Bundle, error)
	// GetBundlesByObject returns Bundles which have a resource of a particular group/kind with a name in a namespace.
	GetBundlesByObject(gk schema.GroupKind, namespace, name string) ([]*smith_v1.Bundle, error)
}

type ReadyChecker

type ReadyChecker interface {
	IsReady(*unstructured.Unstructured) (isReady, retriableError bool, e error)
}

type SpecCheck

type SpecCheck interface {
	CompareActualVsSpec(spec, actual runtime.Object) (updatedSpec *unstructured.Unstructured, match bool, err error)
}

type SpecProcessor

type SpecProcessor struct {
	// contains filtered or unexported fields
}

func NewSpec

func NewSpec(selfName smith_v1.ResourceName, resources map[smith_v1.ResourceName]*resourceInfo, allowedResources []smith_v1.ResourceName) *SpecProcessor

func (*SpecProcessor) ProcessObject

func (sp *SpecProcessor) ProcessObject(obj map[string]interface{}, path ...string) error

func (*SpecProcessor) ProcessString

func (sp *SpecProcessor) ProcessString(value string, path ...string) (interface{}, error)

func (*SpecProcessor) ProcessValue

func (sp *SpecProcessor) ProcessValue(value interface{}, path ...string) (interface{}, error)

type Store

type Store interface {
	smith.ByNameStore
	GetObjectsForBundle(namespace, bundleName string) ([]runtime.Object, error)
	AddInformer(schema.GroupVersionKind, cache.SharedIndexInformer)
	RemoveInformer(schema.GroupVersionKind) bool
}

Jump to

Keyboard shortcuts

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