runner

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFromWatches

func NewFromWatches(path string) (map[schema.GroupVersionKind]Runner, error)

NewFromWatches reads the operator's config file at the provided path.

Types

type Finalizer

type Finalizer struct {
	Name     string                 `yaml:"name"`
	Playbook string                 `yaml:"playbook"`
	Role     string                 `yaml:"role"`
	Vars     map[string]interface{} `yaml:"vars"`
}

Finalizer - Expose finalizer to be used by a user.

type Runner

type Runner interface {
	Run(*unstructured.Unstructured, string) (chan eventapi.JobEvent, error)
	GetFinalizer() (string, bool)
	GetReconcilePeriod() (time.Duration, bool)
}

Runner - a runnable that should take the parameters and name and namespace and run the correct code.

func NewForPlaybook

func NewForPlaybook(path string, gvk schema.GroupVersionKind, finalizer *Finalizer, reconcilePeriod time.Duration) (Runner, error)

NewForPlaybook returns a new Runner based on the path to an ansible playbook.

func NewForRole

func NewForRole(path string, gvk schema.GroupVersionKind, finalizer *Finalizer, reconcilePeriod time.Duration) (Runner, error)

NewForRole returns a new Runner based on the path to an ansible role.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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