environment

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: MIT Imports: 19 Imported by: 4 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifacts

type Artifacts struct {
	Namespace string
	DBName    string
	Client    *client.K8sClient
	// contains filtered or unexported fields
}

Artifacts is an artifacts dumping structure that copies logs and database dumps for all deployed pods

func NewArtifacts

func NewArtifacts(client *client.K8sClient, namespace string) (*Artifacts, error)

NewArtifacts create new artifacts instance for provided environment

func (*Artifacts) DumpTestResult

func (a *Artifacts) DumpTestResult(testDir string, dbName string) error

DumpTestResult dumps all pods logs and db dump in a separate test dir

type Config

type Config struct {
	DryRun            bool
	KeepConnection    bool
	RemoveOnInterrupt bool
}

type Environment

type Environment struct {
	Cfg       *Config
	Client    *client.K8sClient
	Artifacts *Artifacts
	Fwd       *client.Forwarder
	Out       client.ManifestOutput
	URLs      map[string][]string
}

func New

func New(cfg *Config) *Environment

New creates new environment

func (*Environment) Deploy

func (m *Environment) Deploy(app cdk8s.App, c client.ManifestOutput) error

Deploy deploy synthesized manifest and check logs for readiness

func (*Environment) DeployOrConnect

func (m *Environment) DeployOrConnect(app cdk8s.App, out client.ManifestOutput) error

DeployOrConnect deploys or connects to already created environment

func (*Environment) Shutdown

func (m *Environment) Shutdown() error

Shutdown shutdown environment, remove namespace

Jump to

Keyboard shortcuts

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