shipyard

package
v0.5.14 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateClients

func GenerateClients(l hclog.Logger) (*clients.Clients, error)

GenerateClients creates the various clients for creating and destroying resources

Types

type Engine

type Engine interface {
	GetClients() *clients.Clients
	Apply(string) ([]types.Resource, error)

	// ApplyWithVariables applies a configuration file or directory containing
	// configuration. Optionally the user can provide a map of variables which the configuration
	// uses and / or a file containing variables.
	ApplyWithVariables(path string, variables map[string]string, variablesFile string) ([]types.Resource, error)
	ParseConfig(string) ([]types.Resource, error)
	ParseConfigWithVariables(string, map[string]string, string) ([]types.Resource, error)
	Destroy() error
	ResourceCount() int
	ResourceCountForType(string) int
	Blueprint() *resources.Blueprint
}

Engine defines an interface for the Shipyard engine

func New

func New(l hclog.Logger) (Engine, error)

New creates a new shipyard engine

type EngineImpl

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

EngineImpl is responsible for creating and destroying resources

func (*EngineImpl) Apply

func (e *EngineImpl) Apply(path string) ([]types.Resource, error)

Apply the configuration and create or destroy the resources

func (*EngineImpl) ApplyWithVariables

func (e *EngineImpl) ApplyWithVariables(path string, vars map[string]string, variablesFile string) ([]types.Resource, error)

ApplyWithVariables applies the current config creating the resources

func (*EngineImpl) Blueprint

func (e *EngineImpl) Blueprint() *resources.Blueprint

func (*EngineImpl) Destroy

func (e *EngineImpl) Destroy() error

Destroy the resources defined by the state

func (*EngineImpl) GetClients

func (e *EngineImpl) GetClients() *clients.Clients

GetClients returns the clients from the engine

func (*EngineImpl) ParseConfig

func (e *EngineImpl) ParseConfig(path string) ([]types.Resource, error)

ParseConfig parses the given Shipyard files and creating the resource types but does not apply or destroy the resources. This function can be used to check the validity of a configuration without making changes

func (*EngineImpl) ParseConfigWithVariables

func (e *EngineImpl) ParseConfigWithVariables(path string, vars map[string]string, variablesFile string) ([]types.Resource, error)

ParseConfigWithVariables parses the given Shipyard files and creating the resource types but does not apply or destroy the resources. This function can be used to check the validity of a configuration without making changes

func (*EngineImpl) ResourceCount

func (e *EngineImpl) ResourceCount() int

ResourceCount defines the number of resources in a plan

func (*EngineImpl) ResourceCountForType

func (e *EngineImpl) ResourceCountForType(t string) int

ResourceCountForType returns the count of resources matching the given type

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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