ProcessService
本页列出 kibotos.ctrl.v1 中 ProcessService 的方法及每个方法用到的消息与枚举,由 ctrl.proto 及其注释生成,注释保持英文。多个服务共用的消息与枚举见 kibotos.ctrl.v1 类型。
ProcessService owns reconnectable pipe and PTY processes. Every call requires a data-plane bearer credential with PROCESS scope.
A caller whose stream broke can resume it: Attach with resume_from replays the output each channel produced since the given offset, as far as the guest's replay buffer reaches, and SendInput with input_offset can be sent again without writing any byte twice. The server announces both as workspace.process.resume.
Start
/kibotos.ctrl.v1.ProcessService/Start服务端流StartRequestworking_directory is the directory the process starts in. Empty starts it in the home directory of the identity user selects, and a relative one is resolved against that home.
mode中的一个user selects the identity the process runs as: empty for the Template default, the declared account name, or root.
StartResponseProcessPipeMode
ProcessPtyMode
Attach
/kibotos.ctrl.v1.ProcessService/Attach服务端流AttachRequestresume_from replays, before live output, what each listed channel produced from offset on, as far as the replay buffer reaches. A channel not listed starts at its current offset. An offset beyond what the channel produced fails with INVALID_ARGUMENT and leaves the current subscription in place. A guest without replay starts every channel at its current offset.
AttachResponseSendInput
/kibotos.ctrl.v1.ProcessService/SendInput一元调用SendInputRequestinput_offset is where data starts in the process's input. Bytes the process already accepted are skipped, so the request can be sent again; an offset beyond what it accepted fails with FAILED_PRECONDITION and writes nothing. A guest that cannot take input offsets fails the request with UNIMPLEMENTED.
SendInputResponseinput_offset is the number of input bytes the process has accepted after this request. It is absent when the guest cannot take input offsets.
CloseStdin
/kibotos.ctrl.v1.ProcessService/CloseStdin一元调用CloseStdinRequestCloseStdinResponse无字段。
SendSignal
/kibotos.ctrl.v1.ProcessService/SendSignal一元调用SendSignalRequestSendSignalResponse无字段。
ProcessSignal
PROCESS_SIGNAL_UNSPECIFIED= 0PROCESS_SIGNAL_SIGTERM= 1PROCESS_SIGNAL_SIGKILL= 2
Resize
/kibotos.ctrl.v1.ProcessService/Resize一元调用ResizeRequestResizeResponse无字段。
消息与枚举
ProcessService 的多个方法用到以下消息与枚举。
ProcessChannelOffset
offset is the number of bytes the process produced on this channel.
start is where this subscription's output on the channel begins. It equals offset unless the attach resumed; then it is the requested offset or the replay buffer's first byte, whichever is later, so a start above the requested offset is a gap of that many bytes. Only set in attached.
ProcessAttachedEvent
input_offset is the number of input bytes the process has accepted. It is absent when the guest cannot take input offsets.
ProcessOutputEvent
ProcessChannelResult
final_offset is the number of bytes the process produced on this channel.
ProcessExitedEvent
ProcessHeartbeatEvent
此消息没有字段。
OutputStream
OUTPUT_STREAM_UNSPECIFIED= 0OUTPUT_STREAM_STDOUT= 1OUTPUT_STREAM_STDERR= 2OUTPUT_STREAM_PTY= 3
ProcessMode
PROCESS_MODE_UNSPECIFIED= 0PROCESS_MODE_PIPE= 1PROCESS_MODE_PTY= 2
ProcessTerminationReason
PROCESS_TERMINATION_REASON_UNSPECIFIED= 0PROCESS_TERMINATION_REASON_EXITED= 1PROCESS_TERMINATION_REASON_SIGNALED= 2PROCESS_TERMINATION_REASON_TIMED_OUT= 3