Help us shape the future of Go! Take the 2026 Go Developer Survey

environments

package
v0.81.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: Apache-2.0 Imports: 27 Imported by: 14

Documentation

Overview

Package environments contains the definitions of the different environments that can be used in a test.

Package environments contains the definitions of the different environments that can be used in a test.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEnv

func CreateEnv[Env any]() (*Env, []reflect.StructField, []reflect.Value, error)

Types

type CoverageBase added in v0.80.0

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

CoverageBase provides shared coverage override logic. Embed it in any environment that implements Coverageable so the override setter and application come for free.

func (*CoverageBase) SetCoverageRequiredOverride added in v0.80.0

func (c *CoverageBase) SetCoverageRequiredOverride(overrides map[string]bool)

SetCoverageRequiredOverride records per-agent overrides for the Required field. Each key must match a CoverageTargetSpec.AgentName. Passing a nil map clears all overrides.

type CoverageTargetSpec

type CoverageTargetSpec struct {
	AgentName       string
	CoverageCommand []string
	Required        bool
}

CoverageTargetSpec defines the name of the agent, the command to run to generate the coverage and if the coverage is required

type DockerHost

type DockerHost struct {
	CoverageBase
	// Components
	RemoteHost *components.RemoteHost
	FakeIntake *components.FakeIntake
	Agent      *components.DockerAgent
	Docker     *components.RemoteHostDocker
}

DockerHost is an environment that contains a Docker VM, FakeIntake and Agent configured to talk to each other.

func (*DockerHost) Coverage

func (e *DockerHost) Coverage(outputDir string) (string, error)

Coverage generates a coverage report for the Docker agent

func (*DockerHost) Diagnose

func (e *DockerHost) Diagnose(outputDir string) (string, error)

Diagnose returns a string containing the diagnosis of the environment

func (*DockerHost) DisableAgent added in v0.77.0

func (e *DockerHost) DisableAgent()

DisableAgent implements outputs.DockerHostOutputs

func (*DockerHost) DisableFakeIntake added in v0.77.0

func (e *DockerHost) DisableFakeIntake()

DisableFakeIntake implements outputs.DockerHostOutputs

func (*DockerHost) DockerAgentOutput added in v0.77.0

func (e *DockerHost) DockerAgentOutput() *agent.DockerAgentOutput

DockerAgentOutput implements outputs.DockerHostOutputs

func (*DockerHost) DockerOutput added in v0.77.0

func (e *DockerHost) DockerOutput() *docker.ManagerOutput

DockerOutput implements outputs.DockerHostOutputs

func (*DockerHost) FakeIntakeOutput added in v0.77.0

func (e *DockerHost) FakeIntakeOutput() *fakeintake.FakeintakeOutput

FakeIntakeOutput implements outputs.DockerHostOutputs

func (*DockerHost) Init

func (e *DockerHost) Init(_ common.Context) error

Init initializes the environment

func (*DockerHost) RemoteHostOutput added in v0.77.0

func (e *DockerHost) RemoteHostOutput() *remote.HostOutput

RemoteHostOutput implements outputs.DockerHostOutputs

type ECS

type ECS struct {
	// Components
	ECSCluster *components.ECSCluster
	FakeIntake *components.FakeIntake
}

ECS is an environment that contains a ECS deployed in a cluster, FakeIntake and Agent configured to talk to each other.

func (*ECS) DisableFakeIntake added in v0.77.0

func (e *ECS) DisableFakeIntake()

DisableFakeIntake implements outputs.ECSOutputs

func (*ECS) ECSClusterOutput added in v0.77.0

func (e *ECS) ECSClusterOutput() *ecs.ClusterOutput

ECSClusterOutput implements outputs.ECSOutputs

func (*ECS) FakeIntakeOutput added in v0.77.0

func (e *ECS) FakeIntakeOutput() *fakeintake.FakeintakeOutput

FakeIntakeOutput implements outputs.ECSOutputs

type Host

type Host struct {
	CoverageBase
	RemoteHost *components.RemoteHost
	FakeIntake *components.FakeIntake
	Agent      *components.RemoteHostAgent
	Updater    *components.RemoteHostUpdater
}

Host is an environment that contains a Host, FakeIntake and Agent configured to talk to each other.

func (*Host) AgentOutput added in v0.77.0

func (e *Host) AgentOutput() *agent.HostAgentOutput

AgentOutput implements outputs.HostOutputs

func (*Host) Coverage

func (e *Host) Coverage(outputDir string) (string, error)

Coverage runs the coverage command for each agent and downloads the coverage folders to the output directory

func (*Host) Diagnose

func (e *Host) Diagnose(outputDir string) (string, error)

Diagnose returns a string containing the diagnosis of the environment

func (*Host) DisableAgent added in v0.77.0

func (e *Host) DisableAgent()

DisableAgent implements outputs.HostOutputs

func (*Host) DisableFakeIntake added in v0.77.0

func (e *Host) DisableFakeIntake()

DisableFakeIntake implements outputs.HostOutputs

func (*Host) DisableUpdater added in v0.77.0

func (e *Host) DisableUpdater()

DisableUpdater implements outputs.HostOutputs

func (*Host) FakeIntakeOutput added in v0.77.0

func (e *Host) FakeIntakeOutput() *fakeintake.FakeintakeOutput

FakeIntakeOutput implements outputs.HostOutputs

func (*Host) Init

func (e *Host) Init(_ common.Context) error

Init initializes the environment

func (*Host) RemoteHostOutput added in v0.77.0

func (e *Host) RemoteHostOutput() *remote.HostOutput

RemoteHostOutput implements outputs.HostOutputs

func (*Host) SetAgentClientOptions added in v0.77.0

func (e *Host) SetAgentClientOptions(options ...agentclientparams.Option)

SetAgentClientOptions implements outputs.HostOutputs

func (*Host) UpdaterOutput added in v0.77.0

func (e *Host) UpdaterOutput() *updater.HostUpdaterOutput

UpdaterOutput implements outputs.HostOutputs

type Kubernetes

type Kubernetes struct {
	CoverageBase
	// Components
	KubernetesCluster *components.KubernetesCluster
	FakeIntake        *components.FakeIntake
	Agent             *components.KubernetesAgent
}

Kubernetes is an environment that contains a Kubernetes cluster, the Agent and a FakeIntake.

func (*Kubernetes) Coverage

func (e *Kubernetes) Coverage(outputDir string) (string, error)

Coverage generates a coverage report for each pod and container

func (*Kubernetes) Diagnose

func (e *Kubernetes) Diagnose(outputDir string) (string, error)

Diagnose generates a diagnose for the Kubernetes environment, creating a flare for each agent and cluster-agent pod.

func (*Kubernetes) DisableAgent added in v0.77.0

func (e *Kubernetes) DisableAgent()

DisableAgent implements eks.KubernetesOutputs

func (*Kubernetes) DisableFakeIntake added in v0.77.0

func (e *Kubernetes) DisableFakeIntake()

DisableFakeIntake implements eks.KubernetesOutputs

func (*Kubernetes) FakeIntakeOutput added in v0.77.0

func (e *Kubernetes) FakeIntakeOutput() *fakeintake.FakeintakeOutput

FakeIntakeOutput implements eks.KubernetesOutputs

func (*Kubernetes) KubernetesAgentOutput added in v0.77.0

func (e *Kubernetes) KubernetesAgentOutput() *agent.KubernetesAgentOutput

KubernetesAgentOutput implements eks.KubernetesOutputs

func (*Kubernetes) KubernetesClusterOutput added in v0.77.0

func (e *Kubernetes) KubernetesClusterOutput() *kubernetes.ClusterOutput

KubernetesClusterOutput implements eks.KubernetesOutputs

type WindowsHost

type WindowsHost struct {
	Environment config.Env
	// Components
	RemoteHost      *components.RemoteHost
	FakeIntake      *components.FakeIntake
	Agent           *components.RemoteHostAgent
	ActiveDirectory *components.RemoteActiveDirectory
}

WindowsHost is an environment based on environments.Host but that is specific to Windows.

func (*WindowsHost) ActiveDirectoryOutput added in v0.77.0

func (e *WindowsHost) ActiveDirectoryOutput() *activedirectory.Output

ActiveDirectoryOutput implements outputs.WindowsHostOutputs

func (*WindowsHost) AgentOutput added in v0.77.0

func (e *WindowsHost) AgentOutput() *agent.HostAgentOutput

AgentOutput implements outputs.WindowsHostOutputs

func (*WindowsHost) Diagnose

func (e *WindowsHost) Diagnose(outputDir string) (string, error)

Diagnose returns a string containing the diagnosis of the environment

func (*WindowsHost) DisableActiveDirectory added in v0.77.0

func (e *WindowsHost) DisableActiveDirectory()

DisableActiveDirectory implements outputs.WindowsHostOutputs

func (*WindowsHost) DisableAgent added in v0.77.0

func (e *WindowsHost) DisableAgent()

DisableAgent implements outputs.WindowsHostOutputs

func (*WindowsHost) DisableFakeIntake added in v0.77.0

func (e *WindowsHost) DisableFakeIntake()

DisableFakeIntake implements outputs.WindowsHostOutputs

func (*WindowsHost) FakeIntakeOutput added in v0.77.0

func (e *WindowsHost) FakeIntakeOutput() *fakeintake.FakeintakeOutput

FakeIntakeOutput implements outputs.WindowsHostOutputs

func (*WindowsHost) Init

func (e *WindowsHost) Init(_ common.Context) error

Init initializes the environment

func (*WindowsHost) RemoteHostOutput added in v0.77.0

func (e *WindowsHost) RemoteHostOutput() *remote.HostOutput

RemoteHostOutput implements outputs.WindowsHostOutputs

func (*WindowsHost) SetAgentClientOptions added in v0.77.0

func (e *WindowsHost) SetAgentClientOptions(options ...agentclientparams.Option)

func (*WindowsHost) SetEnvironment added in v0.77.0

func (e *WindowsHost) SetEnvironment(env config.Env)

SetEnvironment implements outputs.WindowsHostOutputs

Jump to

Keyboard shortcuts

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