scenario_orchestrator

package
v0.6.0-beta Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonAttachWait

func CommonAttachWait(containerId *string, stdout io.Writer, stderr io.Writer, c ScenarioOrchestrator, ctx context.Context) (bool, error)

func CommonListRunningScenarios

func CommonListRunningScenarios(c ScenarioOrchestrator, ctx context.Context) (*[]models.ScenarioContainer, error)

func CommonPrintRuntime

func CommonPrintRuntime(containerRuntime models.ContainerRuntime)

func CommonRunAttached

func CommonRunAttached(image string, containerName string, env map[string]string, cache bool, volumeMounts map[string]string, stdout io.Writer, stderr io.Writer, c ScenarioOrchestrator, commChan *chan *string, ctx context.Context) (*string, error)

func CommonRunGraph

func CommonRunGraph(scenarios models.ScenarioSet, resolvedGraph models.ResolvedGraph, extraEnv map[string]string, extraVolumeMounts map[string]string, cache bool, commChannel chan *models.GraphCommChannel, orchestrator ScenarioOrchestrator, config config.Config, ctx context.Context)

Types

type ScenarioOrchestrator

type ScenarioOrchestrator interface {
	Connect(containerRuntimeUri string) (context.Context, error)

	Run(image string, containerName string, env map[string]string, cache bool, volumeMounts map[string]string, commChan *chan *string, ctx context.Context) (*string, error)

	RunAttached(image string, containerName string, env map[string]string, cache bool, volumeMounts map[string]string, stdout io.Writer, stderr io.Writer, commChan *chan *string, ctx context.Context) (*string, error)

	RunGraph(scenarios orchestrator_models.ScenarioSet, resolvedGraph orchestrator_models.ResolvedGraph, extraEnv map[string]string, extraVolumeMounts map[string]string, cache bool, commChannel chan *orchestrator_models.GraphCommChannel, ctx context.Context)

	CleanContainers(ctx context.Context) (*int, error)

	AttachWait(containerId *string, stdout io.Writer, stderr io.Writer, ctx context.Context) (*bool, error)

	Attach(containerId *string, signalChannel chan os.Signal, stdout io.Writer, stderr io.Writer, ctx context.Context) (bool, error)

	Kill(containerId *string, ctx context.Context) error

	ListRunningContainers(ctx context.Context) (*map[int64]orchestrator_models.Container, error)
	ListRunningScenarios(ctx context.Context) (*[]orchestrator_models.ScenarioContainer, error)
	InspectScenario(container orchestrator_models.Container, ctx context.Context) (*orchestrator_models.ScenarioContainer, error)

	GetContainerRuntimeSocket(userId *int) (*string, error)

	GetContainerRuntime() orchestrator_models.ContainerRuntime
	PrintContainerRuntime()
	GetConfig() config.Config
	ResolveContainerName(containerName string, ctx context.Context) (*string, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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