Documentation ¶
Index ¶
- type Engine
- type EngineImpl
- func (e *EngineImpl) Apply(path string) (*hclconfig.Config, error)
- func (e *EngineImpl) ApplyWithVariables(path string, vars map[string]string, variablesFile string) (*hclconfig.Config, error)
- func (e *EngineImpl) Config() *hclconfig.Config
- func (e *EngineImpl) Destroy() error
- func (e *EngineImpl) Diff(path string, variables map[string]string, variablesFile string) ([]types.Resource, []types.Resource, []types.Resource, *hclconfig.Config, error)
- func (e *EngineImpl) ParseConfig(path string) (*hclconfig.Config, error)
- func (e *EngineImpl) ParseConfigWithVariables(path string, vars map[string]string, variablesFile string) (*hclconfig.Config, error)
- func (e *EngineImpl) ResourceCount() int
- func (e *EngineImpl) ResourceCountForType(t string) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine interface { Apply(string) (*hclconfig.Config, 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) (*hclconfig.Config, error) ParseConfig(string) (*hclconfig.Config, error) ParseConfigWithVariables(string, map[string]string, string) (*hclconfig.Config, error) Destroy() error Config() *hclconfig.Config Diff(path string, variables map[string]string, variablesFile string) (new []types.Resource, changed []types.Resource, removed []types.Resource, cfg *hclconfig.Config, err error) }
Engine defines an interface for the 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) (*hclconfig.Config, 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) (*hclconfig.Config, error)
ApplyWithVariables applies the current config creating the resources
func (*EngineImpl) Config ¶
func (e *EngineImpl) Config() *hclconfig.Config
Config returns the parsed config
func (*EngineImpl) Destroy ¶
func (e *EngineImpl) Destroy() error
Destroy the resources defined by the state
func (*EngineImpl) ParseConfig ¶
func (e *EngineImpl) ParseConfig(path string) (*hclconfig.Config, 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) (*hclconfig.Config, 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