drivers

package
v0.0.0-...-07c265d Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerLabProblemEnvironmentDriver

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

func NewContainerLabProblemEnvironmentDriver

func NewContainerLabProblemEnvironmentDriver(configDir string, dockerClient dockerClient.APIClient) *ContainerLabProblemEnvironmentDriver

func (*ContainerLabProblemEnvironmentDriver) Check

Check implements ProblemEnvironmentDriver

func (*ContainerLabProblemEnvironmentDriver) Deploy

Deploy implements ProblemEnvironmentDriver

func (*ContainerLabProblemEnvironmentDriver) Destroy

Destroy implements ProblemEnvironmentDriver

type NoopProblemEnvironmentDriver

type NoopProblemEnvironmentDriver struct{}

func NewNoopProblemEnvironmentDriver

func NewNoopProblemEnvironmentDriver() *NoopProblemEnvironmentDriver

func (*NoopProblemEnvironmentDriver) Check

Check implements ProblemEnvironmentDriver

func (*NoopProblemEnvironmentDriver) Deploy

Deploy implements ProblemEnvironmentDriver

func (*NoopProblemEnvironmentDriver) Destroy

func (*NoopProblemEnvironmentDriver) Destroy(
	ctx context.Context,
	client client.Client,
	problemEnvironment netconv1alpha1.ProblemEnvironment,
) error

Destroy implements ProblemEnvironmentDriver

type ProblemEnvironmentDriver

type ProblemEnvironmentDriver interface {
	// Check whether ProblemEnvironment is deployed or not and return ContainerStatus
	// []ContainerDetailStatus should be nil if ProblemEnvironment is not deployed successfully
	Check(ctx context.Context, reader client.Client, problemEnvironment netconv1alpha1.ProblemEnvironment) (ProblemEnvironmentStatus, []netconv1alpha1.ContainerStatus)

	// Deploy ProblemEnvironment
	Deploy(ctx context.Context, reader client.Client, problemEnvironment netconv1alpha1.ProblemEnvironment) error

	// Destroy ProblemEnvironment
	Destroy(ctx context.Context, reader client.Client, problemEnvironment netconv1alpha1.ProblemEnvironment) error
}

type ProblemEnvironmentStatus

type ProblemEnvironmentStatus string
const (
	// StatusInit indicates ProblemEnvironment has not been deployed yet
	StatusInit ProblemEnvironmentStatus = "Init"

	// StatusInit indicates ProblemEnvironment was deployed successfully
	StatusDeployed ProblemEnvironmentStatus = "Deployed"

	// StatusInit indicates ProblemEnvironment was not deployed successfully
	StatusError ProblemEnvironmentStatus = "Error"
)

Jump to

Keyboard shortcuts

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