Documentation ¶
Index ¶
- func GenerateClients(l hclog.Logger) (*clients.Clients, error)
- type Engine
- type EngineImpl
- func (e *EngineImpl) Apply(path string) ([]types.Resource, error)
- func (e *EngineImpl) ApplyWithVariables(path string, vars map[string]string, variablesFile string) ([]types.Resource, error)
- func (e *EngineImpl) Blueprint() *resources.Blueprint
- func (e *EngineImpl) Destroy() error
- func (e *EngineImpl) GetClients() *clients.Clients
- func (e *EngineImpl) ParseConfig(path string) ([]types.Resource, error)
- func (e *EngineImpl) ParseConfigWithVariables(path string, vars map[string]string, variablesFile string) ([]types.Resource, error)
- func (e *EngineImpl) ResourceCount() int
- func (e *EngineImpl) ResourceCountForType(t string) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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
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