Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelRequest ¶
func NewCancelRequest ¶
func NewCancelRequest(s *pipeline.Step) *CancelRequest
type ConnectRequest ¶
type ConnectRequest struct {
Step *pipeline.Step
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
Tty bool
TerminalSizeQueue TerminalSizeQueue
}
// ConnectRequest holds information pertaining to the current streaming session: // input/output streams, if the client is requesting a TTY, and a terminal size queue to // support terminal resizing.
type LogRequest ¶
type RunRequest ¶
type RunRequest struct {
RunnerParams map[string]string // runner 运行需要的参数
RunParams map[string]string // step 运行需要的参数
Mount *pipeline.MountData // 挂载文件
Step *pipeline.Step // 具体step
}
func NewRunRequest ¶
func NewRunRequest(s *pipeline.Step) *RunRequest
func (*RunRequest) LoadMount ¶
func (r *RunRequest) LoadMount(m *pipeline.MountData)
func (*RunRequest) LoadRunParams ¶
func (r *RunRequest) LoadRunParams(params map[string]string)
func (*RunRequest) LoadRunnerParams ¶
func (r *RunRequest) LoadRunnerParams(params map[string]string)
type RunResponse ¶
type RunResponse struct {
// contains filtered or unexported fields
}
func NewRunReponse ¶
func NewRunReponse(updater UpdateStepCallback) *RunResponse
func (*RunResponse) ErrorMessage ¶
func (r *RunResponse) ErrorMessage() string
func (*RunResponse) Failed ¶
func (r *RunResponse) Failed(format string, a ...interface{})
func (*RunResponse) HasError ¶
func (r *RunResponse) HasError() bool
func (*RunResponse) UpdateCtxMap ¶
func (r *RunResponse) UpdateCtxMap(k, v string)
func (*RunResponse) UpdateReponseMap ¶
func (r *RunResponse) UpdateReponseMap(k, v string)
func (*RunResponse) UpdateResponse ¶
func (r *RunResponse) UpdateResponse(s *pipeline.Step)
type Runner ¶
type Runner interface {
// 执行Step, 执行过后的关联信息保存在Status的Response里面
Run(context.Context, *RunRequest, *RunResponse)
// 连接到该执行环境
Connect(context.Context, *ConnectRequest) error
// 取消Step的执行
Cancel(context.Context, *CancelRequest)
}
type TerminalSize ¶
TerminalSize represents the width and height of a terminal.
type TerminalSizeQueue ¶
type TerminalSizeQueue interface {
// Next returns the new terminal size after the terminal has been resized. It returns nil when
// monitoring has been stopped.
Next() *TerminalSize
}
TerminalSizeQueue is capable of returning terminal resize events as they occur.
type UpdateStepCallback ¶
Click to show internal directories.
Click to hide internal directories.