spec

package
v0.20.4-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: Apache-2.0 Imports: 5 Imported by: 6

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

func (*AppSpec) GetID

func (in *AppSpec) GetID(instanceID string) string

GetID returns the unique ID for the app specs

type Factory

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

Factory is an application spec factory

func NewFactory

func NewFactory(specDir, storageProvisioner 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, storageProvisioner 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