kubernetes

package
v0.0.0-...-930cb11 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BuildStageGetSources               string = "get_sources"
	BuildStageDownloadArtifacts        string = "download_artifacts"
	BuildStageUserScript               string = "build_script"
	BuildStageArchiveCache             string = "archive_cache"
	BuildStageUploadOnSuccessArtifacts string = "upload_artifacts_on_success"
	BuildStageUploadOnFailureArtifacts string = "upload_artifacts_on_failure"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultRemoteExecutor

type DefaultRemoteExecutor struct{}

DefaultRemoteExecutor是远程命令执行的标准实现

func (*DefaultRemoteExecutor) Execute

func (*DefaultRemoteExecutor) Execute(method string, url *url.URL, config *restclient.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool) error

type ExecOptions

type ExecOptions struct {
	Namespace     string
	PodName       string
	ContainerName string
	Stdin         bool
	Command       []string

	In  io.Reader
	Out io.Writer
	Err io.Writer

	Executor RemoteExecutor
	Client   *kubernetes.Clientset
	Config   *restclient.Config
}

ExecOptions声明Exec命令接受的参数

func (*ExecOptions) Run

func (p *ExecOptions) Run() error

Run 执行 验证过的远程命名

type KubernetesExecutor

type KubernetesExecutor struct {
	BuildLog      *os.File
	ObjectName    string
	IsSystemError bool
	// contains filtered or unexported fields
}

func (*KubernetesExecutor) Cleanup

func (e *KubernetesExecutor) Cleanup() error

func (*KubernetesExecutor) Prepare

func (e *KubernetesExecutor) Prepare(job common.Job) error

func (*KubernetesExecutor) Run

func (e *KubernetesExecutor) Run() error

func (*KubernetesExecutor) SendError

func (e *KubernetesExecutor) SendError(err error)

func (*KubernetesExecutor) Wait

func (e *KubernetesExecutor) Wait() error

type RemoteExecutor

type RemoteExecutor interface {
	Execute(method string, url *url.URL, config *restclient.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool) error
}

RemoteExecutor定义Exec命令接受的接口-用于测试

Jump to

Keyboard shortcuts

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