plugin

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: 3 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context added in v1.0.0

type Context struct {
	Dependencies map[smith_v1.ResourceName]Dependency
}

Context contains contextual information for the Process() call.

type Dependency

type Dependency struct {
	Spec      smith_v1.Resource
	Actual    runtime.Object
	Outputs   []runtime.Object
	Auxiliary []runtime.Object
}

Dependency contains information about a dependency of a resource that a plugin is processing.

type Description added in v1.0.0

type Description struct {
	Name smith_v1.PluginName
	GVK  schema.GroupVersionKind
}

type NewFunc added in v1.0.0

type NewFunc func() (Plugin, error)

NewFunc is a factory function that returns an initialized plugin. Called once on Smith startup.

type Plugin added in v1.0.0

type Plugin interface {
	// Describe returns information about the plugin.
	Describe() *Description
	// Process processes a plugin specification and produces an object as the result.
	Process(map[string]interface{}, *Context) (*ProcessResult, error)
}

Plugin represents a plugin and the functionality it provides.

type ProcessResult

type ProcessResult struct {
	Object runtime.Object
}

ProcessResult contains result of the Process() call.

Jump to

Keyboard shortcuts

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