commoncommands

package
v0.0.0-...-9994f1b Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2025 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

Package commoncommands stores some command commands ran by ctpv2/filters.

Index

Constants

View Source
const (
	// Ctr service related commands
	ContainerStartCmdType       interfaces.CommandType = "ContainerStart"
	ContainerCloseLogsCmdType   interfaces.CommandType = "ContainerCloseLogs"
	ContainerReadLogsCmdType    interfaces.CommandType = "ContainerReadLogs"
	CtrServiceStartAsyncCmdType interfaces.CommandType = "CtrServiceStartAsync"
	CtrServiceStopCmdType       interfaces.CommandType = "CtrServiceStop"
	GcloudAuthCmdType           interfaces.CommandType = "GcloudAuth"

	// For testing purposes only
	UnSupportedCmdType interfaces.CommandType = "UnSupportedCmd"
)

All supported common command types.

Variables

This section is empty.

Functions

func InstantiatePopFromQueue

func InstantiatePopFromQueue(queue *list.List, caster func(any)) (err error)

Types

type ContainerCloseLogsCmd

type ContainerCloseLogsCmd struct {
	*interfaces.SingleCmdByExecutor
}

ContainerCloseLogsCmd represents container close logs command.

func NewContainerCloseLogsCmd

func NewContainerCloseLogsCmd(executor interfaces.ExecutorInterface) *ContainerCloseLogsCmd

type ContainerReadLogsCmd

type ContainerReadLogsCmd struct {
	*interfaces.SingleCmdByExecutor
}

ContainerReadLogsCmd represents container close logs command.

func NewContainerReadLogsCmd

func NewContainerReadLogsCmd(executor interfaces.ExecutorInterface) *ContainerReadLogsCmd

type ContainerStartCmd

type ContainerStartCmd struct {
	*interfaces.SingleCmdByExecutor

	// Deps
	ContainerRequest *testapi.ContainerRequest
	ContainerImage   string

	// Updates
	Endpoint          *labapi.IpEndpoint
	ContainerInstance interfaces.ContainerInterface

	// For internal use only
	// skip starting the container (skips execute)
	SkipStartingContainer bool

	// For BQ logging
	Req        *testapi.InternalTestplan
	BQClient   *bigquery.Client
	BuildState *build.State
	// contains filtered or unexported fields
}

ContainerStartCmd represents gcloud auth cmd.

func NewContainerStartCmd

func NewContainerStartCmd(executor interfaces.ExecutorInterface) *ContainerStartCmd

func (*ContainerStartCmd) ExtractDependencies

func (cmd *ContainerStartCmd) ExtractDependencies(ctx context.Context,
	ski interfaces.StateKeeperInterface) error

ExtractDependencies extracts all the command dependencies from state keeper.

func (*ContainerStartCmd) Instantiate

Instantiate extracts initial state info from the state keeper.

func (*ContainerStartCmd) UpdateStateKeeper

func (cmd *ContainerStartCmd) UpdateStateKeeper(
	ctx context.Context,
	ski interfaces.StateKeeperInterface) error

UpdateStateKeeper updates the state keeper with info from the cmd.

type CtrServiceStartAsyncCmd

type CtrServiceStartAsyncCmd struct {
	*interfaces.SingleCmdByExecutor
}

CtrServiceStartAsyncCmd represents ctr service start async command.

func NewCtrServiceStartAsyncCmd

func NewCtrServiceStartAsyncCmd(executor interfaces.ExecutorInterface) *CtrServiceStartAsyncCmd

type CtrServiceStopCmd

type CtrServiceStopCmd struct {
	*interfaces.SingleCmdByExecutor
}

CtrServiceStopCmd represents ctr service stop command.

func NewCtrServiceStopCmd

func NewCtrServiceStopCmd(executor interfaces.ExecutorInterface) *CtrServiceStopCmd

type GcloudAuthCmd

type GcloudAuthCmd struct {
	*interfaces.SingleCmdByExecutor

	// Deps
	DockerKeyFileLocation string

	// Config auth mode
	UseDockerKeyDirectly bool
}

GcloudAuthCmd represents gcloud auth cmd.

func NewGcloudAuthCmd

func NewGcloudAuthCmd(executor interfaces.ExecutorInterface) *GcloudAuthCmd

func (*GcloudAuthCmd) ExtractDependencies

func (cmd *GcloudAuthCmd) ExtractDependencies(ctx context.Context,
	ski interfaces.StateKeeperInterface) error

ExtractDependencies extracts all the command dependencies from state keeper.

Jump to

Keyboard shortcuts

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