Documentation ¶
Overview ¶
Package provisioners contains the definitions of the different provisioners that can be used in a test to setup an environment.
Index ¶
- type Diagnosable
- type FileProvisioner
- type Provisioner
- type ProvisionerMap
- type PulumiEnvRunFunc
- type PulumiProvisioner
- func (pp *PulumiProvisioner[Env]) Destroy(ctx context.Context, stackName string, logger io.Writer) error
- func (pp *PulumiProvisioner[Env]) Diagnose(ctx context.Context, stackName string) (string, error)
- func (pp *PulumiProvisioner[Env]) ID() string
- func (pp *PulumiProvisioner[Env]) Provision(ctx context.Context, stackName string, logger io.Writer) (RawResources, error)
- func (pp *PulumiProvisioner[Env]) ProvisionEnv(ctx context.Context, stackName string, logger io.Writer, env *Env) (RawResources, error)
- func (pp *PulumiProvisioner[Env]) SetDiagnoseFunc(diagnoseFunc func(ctx context.Context, stackName string) (string, error))
- type RawResources
- type TypedProvisioner
- type UntypedProvisioner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Diagnosable ¶
Diagnosable defines the interface for a diagnosable provider.
type FileProvisioner ¶
type FileProvisioner struct {
// contains filtered or unexported fields
}
FileProvisioner is a provisioner that reads JSON files from a filesystem.
func NewFileProvisioner ¶
func NewFileProvisioner(id string, fs fs.FS) *FileProvisioner
NewFileProvisioner returns a new FileProvisioner.
func (*FileProvisioner) ID ¶
func (fp *FileProvisioner) ID() string
ID returns the ID of the provisioner.
func (*FileProvisioner) Provision ¶
func (fp *FileProvisioner) Provision(context.Context, string, io.Writer) (RawResources, error)
Provision reads JSON files from the filesystem and returns them as raw resources.
type Provisioner ¶
Provisioner defines the interface for a provisioner.
type ProvisionerMap ¶
type ProvisionerMap map[string]Provisioner
ProvisionerMap is a map of provisioners.
func CopyProvisioners ¶
func CopyProvisioners(in ProvisionerMap) ProvisionerMap
CopyProvisioners copies a map of provisioners
type PulumiEnvRunFunc ¶
PulumiEnvRunFunc is a function that runs a Pulumi program with a given environment.
type PulumiProvisioner ¶
type PulumiProvisioner[Env any] struct { // contains filtered or unexported fields }
PulumiProvisioner is a provisioner based on Pulumi with binding to an environment.
func NewTypedPulumiProvisioner ¶
func NewTypedPulumiProvisioner[Env any](id string, runFunc PulumiEnvRunFunc[Env], configMap runner.ConfigMap) *PulumiProvisioner[Env]
NewTypedPulumiProvisioner returns a new PulumiProvisioner.
func NewUntypedPulumiProvisioner ¶
func NewUntypedPulumiProvisioner(id string, runFunc pulumi.RunFunc, configMap runner.ConfigMap) *PulumiProvisioner[any]
NewUntypedPulumiProvisioner returns a new PulumiProvisioner without env binding.
func (*PulumiProvisioner[Env]) Destroy ¶
func (pp *PulumiProvisioner[Env]) Destroy(ctx context.Context, stackName string, logger io.Writer) error
Destroy deletes the Pulumi stack.
func (*PulumiProvisioner[Env]) Diagnose ¶
Diagnose runs the diagnose function if it is set diagnoseFunc
func (*PulumiProvisioner[Env]) ID ¶
func (pp *PulumiProvisioner[Env]) ID() string
ID returns the ID of the provisioner.
func (*PulumiProvisioner[Env]) Provision ¶
func (pp *PulumiProvisioner[Env]) Provision(ctx context.Context, stackName string, logger io.Writer) (RawResources, error)
Provision runs the Pulumi program and returns the raw resources.
func (*PulumiProvisioner[Env]) ProvisionEnv ¶
func (pp *PulumiProvisioner[Env]) ProvisionEnv(ctx context.Context, stackName string, logger io.Writer, env *Env) (RawResources, error)
ProvisionEnv runs the Pulumi program with a given environment and returns the raw resources.
func (*PulumiProvisioner[Env]) SetDiagnoseFunc ¶
func (pp *PulumiProvisioner[Env]) SetDiagnoseFunc(diagnoseFunc func(ctx context.Context, stackName string) (string, error))
SetDiagnoseFunc sets the diagnose function.
type RawResources ¶
RawResources is the common types returned by provisioners
func (RawResources) Merge ¶
func (rr RawResources) Merge(in RawResources)
Merge merges two RawResources maps
type TypedProvisioner ¶
type TypedProvisioner[Env any] interface { Provisioner ProvisionEnv(context.Context, string, io.Writer, *Env) (RawResources, error) }
TypedProvisioner defines the interface for a provisioner with env binding
type UntypedProvisioner ¶
type UntypedProvisioner interface { Provisioner Provision(context.Context, string, io.Writer) (RawResources, error) }
UntypedProvisioner defines the interface for a provisioner without env binding
Directories ¶
Path | Synopsis |
---|---|
aws
|
|
docker
Package awsdocker contains the definition of the AWS Docker environment.
|
Package awsdocker contains the definition of the AWS Docker environment. |
ecs
Package ecs contains the definition of the AWS ECS environment.
|
Package ecs contains the definition of the AWS ECS environment. |
host
Package awshost contains the definition of the AWS Host environment.
|
Package awshost contains the definition of the AWS Host environment. |
host/windows
Package winawshost contains the definition of the AWS Windows Host environment.
|
Package winawshost contains the definition of the AWS Windows Host environment. |
kubernetes
Package awskubernetes contains the provisioner for the Kubernetes based environments
|
Package awskubernetes contains the provisioner for the Kubernetes based environments |
azure
|
|
host/linux
Package azurehost contains the definition of the Azure Host environment.
|
Package azurehost contains the definition of the Azure Host environment. |
host/windows
Package winazurehost contains the definition of the Azure Windows Host environment.
|
Package winazurehost contains the definition of the Azure Windows Host environment. |
kubernetes
Package azurekubernetes contains the provisioner for Azure Kubernetes Service (AKS)
|
Package azurekubernetes contains the provisioner for Azure Kubernetes Service (AKS) |
gcp
|
|
host/linux
Package gcphost contains the definition of the GCP Host environment.
|
Package gcphost contains the definition of the GCP Host environment. |
kubernetes
Package gcpkubernetes contains the provisioner for Google Kubernetes Engine (GKE)
|
Package gcpkubernetes contains the provisioner for Google Kubernetes Engine (GKE) |
local
|
|
host
Package localhost contains the provisioner for the local Host based environments
|
Package localhost contains the provisioner for the local Host based environments |
kubernetes
Package localkubernetes contains the provisioner for the local Kubernetes based environments
|
Package localkubernetes contains the provisioner for the local Kubernetes based environments |