spec

package
v0.0.0-...-4c0c8b4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppSpec

type AppSpec struct {
	// Key is used by applications to register to the factory
	Key string
	// List of k8s spec objects
	SpecList []interface{}
	// Enabled indicates if the application is enabled in the factory
	Enabled bool
}

AppSpec defines a k8s application specification

func (*AppSpec) DeepCopy

func (in *AppSpec) DeepCopy() *AppSpec

DeepCopy Creates a copy of the AppSpec

type Factory

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

Factory is an application spec factory

func NewFactory

func NewFactory(specDir string, parser Parser) (*Factory, error)

NewFactory creates a new spec factory

func (*Factory) Get

func (f *Factory) Get(id string) (*AppSpec, error)

Get returns a registered application

func (*Factory) GetAll

func (f *Factory) GetAll() []*AppSpec

GetAll returns all registered enabled applications

type Parser

type Parser interface {
	ParseSpecs(specDir string) ([]interface{}, error)
}

Parser provides operations for parsing application specs

Jump to

Keyboard shortcuts

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