Documentation
¶
Overview ¶
Package v1 defines the gRPC ClawkerdService for CP-to-clawkerd command dispatch.
ClawkerdService is hosted by clawkerd inside each agent container on consts.DefaultClawkerdPort. CP is the sole legitimate caller — the listener requires an mTLS peer cert chained to the clawker CA AND pins the peer's CN to consts.ContainerCP, rejecting any other clawker-CA-signed cert.
The Session RPC is bidi-streaming: CP streams Commands, clawkerd streams Responses correlated by command_id.
Index ¶
- Constants
- Variables
- func RegisterClawkerdServiceServer(s grpc.ServiceRegistrar, srv ClawkerdServiceServer)
- type AgentReady
- type ClawkerdServiceClient
- type ClawkerdServiceServer
- type ClawkerdService_SessionClient
- type ClawkerdService_SessionServer
- type CloseStdin
- type Command
- func (*Command) Descriptor() ([]byte, []int)deprecated
- func (x *Command) GetAgentReady() *AgentReady
- func (x *Command) GetCloseStdin() *CloseStdin
- func (x *Command) GetCommandId() string
- func (x *Command) GetHello() *Hello
- func (x *Command) GetPayload() isCommand_Payload
- func (x *Command) GetRegisterRequired() *RegisterRequired
- func (x *Command) GetShell() *ShellCommand
- func (x *Command) GetSignal() *Signal
- func (x *Command) GetStdin() *Stdin
- func (*Command) ProtoMessage()
- func (x *Command) ProtoReflect() protoreflect.Message
- func (x *Command) Reset()
- func (x *Command) String() string
- type Command_AgentReady
- type Command_CloseStdin
- type Command_Hello
- type Command_RegisterRequired
- type Command_Shell
- type Command_Signal
- type Command_Stdin
- type Done
- type Error
- type ErrorCode
- type Hello
- type HelloAck
- type PipeStage
- func (*PipeStage) Descriptor() ([]byte, []int)deprecated
- func (x *PipeStage) GetArgv() []string
- func (x *PipeStage) GetCwd() string
- func (x *PipeStage) GetEnv() map[string]string
- func (x *PipeStage) GetGid() uint32
- func (x *PipeStage) GetUid() uint32
- func (*PipeStage) ProtoMessage()
- func (x *PipeStage) ProtoReflect() protoreflect.Message
- func (x *PipeStage) Reset()
- func (x *PipeStage) String() string
- type RegisterDone
- func (*RegisterDone) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterDone) GetError() string
- func (x *RegisterDone) GetOk() bool
- func (*RegisterDone) ProtoMessage()
- func (x *RegisterDone) ProtoReflect() protoreflect.Message
- func (x *RegisterDone) Reset()
- func (x *RegisterDone) String() string
- type RegisterRequired
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetCommandId() string
- func (x *Response) GetDone() *Done
- func (x *Response) GetError() *Error
- func (x *Response) GetHelloAck() *HelloAck
- func (x *Response) GetPayload() isResponse_Payload
- func (x *Response) GetRegisterDone() *RegisterDone
- func (x *Response) GetStageExit() *StageExit
- func (x *Response) GetStarted() *Started
- func (x *Response) GetStderr() *StderrChunk
- func (x *Response) GetStdout() *StdoutChunk
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
- type Response_Done
- type Response_Error
- type Response_HelloAck
- type Response_RegisterDone
- type Response_StageExit
- type Response_Started
- type Response_Stderr
- type Response_Stdout
- type ShellCommand
- func (*ShellCommand) Descriptor() ([]byte, []int)deprecated
- func (x *ShellCommand) GetInitialStdin() []byte
- func (x *ShellCommand) GetStages() []*PipeStage
- func (x *ShellCommand) GetTimeoutSeconds() uint32
- func (*ShellCommand) ProtoMessage()
- func (x *ShellCommand) ProtoReflect() protoreflect.Message
- func (x *ShellCommand) Reset()
- func (x *ShellCommand) String() string
- type Signal
- type StageExit
- func (*StageExit) Descriptor() ([]byte, []int)deprecated
- func (x *StageExit) GetExitCode() int32
- func (x *StageExit) GetSigno() int32
- func (x *StageExit) GetStageIndex() uint32
- func (*StageExit) ProtoMessage()
- func (x *StageExit) ProtoReflect() protoreflect.Message
- func (x *StageExit) Reset()
- func (x *StageExit) String() string
- type Started
- type StderrChunk
- func (*StderrChunk) Descriptor() ([]byte, []int)deprecated
- func (x *StderrChunk) GetData() []byte
- func (x *StderrChunk) GetStageIndex() uint32
- func (*StderrChunk) ProtoMessage()
- func (x *StderrChunk) ProtoReflect() protoreflect.Message
- func (x *StderrChunk) Reset()
- func (x *StderrChunk) String() string
- type Stdin
- type StdoutChunk
- type UnimplementedClawkerdServiceServer
- type UnsafeClawkerdServiceServer
Constants ¶
const (
ClawkerdService_Session_FullMethodName = "/clawker.clawkerd.v1.ClawkerdService/Session"
)
const ServiceName = "clawker.clawkerd.v1.ClawkerdService"
ServiceName is the fully-qualified gRPC service name for ClawkerdService.
Variables ¶
var ( ErrorCode_name = map[int32]string{ 0: "ERROR_CODE_UNSPECIFIED", 1: "ERROR_CODE_UNKNOWN_COMMAND_ID", 2: "ERROR_CODE_INVALID_REQUEST", 3: "ERROR_CODE_SPAWN_FAILED", 4: "ERROR_CODE_TIMEOUT", 5: "ERROR_CODE_IO_ERROR", 6: "ERROR_CODE_NOT_FOUND", } ErrorCode_value = map[string]int32{ "ERROR_CODE_UNSPECIFIED": 0, "ERROR_CODE_UNKNOWN_COMMAND_ID": 1, "ERROR_CODE_INVALID_REQUEST": 2, "ERROR_CODE_SPAWN_FAILED": 3, "ERROR_CODE_TIMEOUT": 4, "ERROR_CODE_IO_ERROR": 5, "ERROR_CODE_NOT_FOUND": 6, } )
Enum value maps for ErrorCode.
var ClawkerdService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "clawker.clawkerd.v1.ClawkerdService", HandlerType: (*ClawkerdServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Session", Handler: _ClawkerdService_Session_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "clawkerd/v1/clawkerd.proto", }
ClawkerdService_ServiceDesc is the grpc.ServiceDesc for ClawkerdService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_clawkerd_v1_clawkerd_proto protoreflect.FileDescriptor
Functions ¶
func RegisterClawkerdServiceServer ¶
func RegisterClawkerdServiceServer(s grpc.ServiceRegistrar, srv ClawkerdServiceServer)
Types ¶
type AgentReady ¶
type AgentReady struct {
// contains filtered or unexported fields
}
AgentReady is the terminal init-sequence signal. clawkerd releases the entrypoint to exec the user CMD. Idempotent on reconnect (no reader → no-op success). Reply: Done{exit_code:0} on release or reconnect-replay; Error{NOT_FOUND} if the fifo is missing entirely (build drift); Error{IO_ERROR} on syscall-level failure.
func (*AgentReady) Descriptor
deprecated
func (*AgentReady) Descriptor() ([]byte, []int)
Deprecated: Use AgentReady.ProtoReflect.Descriptor instead.
func (*AgentReady) ProtoMessage ¶
func (*AgentReady) ProtoMessage()
func (*AgentReady) ProtoReflect ¶
func (x *AgentReady) ProtoReflect() protoreflect.Message
func (*AgentReady) Reset ¶
func (x *AgentReady) Reset()
func (*AgentReady) String ¶
func (x *AgentReady) String() string
type ClawkerdServiceClient ¶
type ClawkerdServiceClient interface {
// Session is the lifetime command channel from CP to clawkerd.
// CP opens the stream, sends Hello as the first Command, then
// dispatches ShellCommand / Stdin / CloseStdin / Signal as
// needed. clawkerd streams Responses correlated by command_id.
Session(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[Command, Response], error)
}
ClawkerdServiceClient is the client API for ClawkerdService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
ClawkerdService is the gRPC surface CP calls on clawkerd (the per- container agent daemon).
Transport: mTLS over TCP on clawkerd's listener inside the agent container (port consts.DefaultClawkerdPort), reachable from CP via clawker-net. The listener requires a peer cert chained to the clawker CA AND pins the peer's CN to consts.ContainerCP — the sole legitimate caller is CP. Any other clawker-CA-signed cert (e.g. another agent's) is rejected at the TLS layer. Without CN pinning, agent-to-agent privilege escalation would be possible.
No JWT/bearer layer on this listener — mTLS + CN pin is the entire auth check.
Topology: CP is gRPC-client, clawkerd is server. Session is bidi: CP streams Commands; clawkerd streams Responses. command_id correlates each Response back to the Command that produced it, allowing concurrent commands per Session.
func NewClawkerdServiceClient ¶
func NewClawkerdServiceClient(cc grpc.ClientConnInterface) ClawkerdServiceClient
type ClawkerdServiceServer ¶
type ClawkerdServiceServer interface {
// Session is the lifetime command channel from CP to clawkerd.
// CP opens the stream, sends Hello as the first Command, then
// dispatches ShellCommand / Stdin / CloseStdin / Signal as
// needed. clawkerd streams Responses correlated by command_id.
Session(grpc.BidiStreamingServer[Command, Response]) error
// contains filtered or unexported methods
}
ClawkerdServiceServer is the server API for ClawkerdService service. All implementations must embed UnimplementedClawkerdServiceServer for forward compatibility.
ClawkerdService is the gRPC surface CP calls on clawkerd (the per- container agent daemon).
Transport: mTLS over TCP on clawkerd's listener inside the agent container (port consts.DefaultClawkerdPort), reachable from CP via clawker-net. The listener requires a peer cert chained to the clawker CA AND pins the peer's CN to consts.ContainerCP — the sole legitimate caller is CP. Any other clawker-CA-signed cert (e.g. another agent's) is rejected at the TLS layer. Without CN pinning, agent-to-agent privilege escalation would be possible.
No JWT/bearer layer on this listener — mTLS + CN pin is the entire auth check.
Topology: CP is gRPC-client, clawkerd is server. Session is bidi: CP streams Commands; clawkerd streams Responses. command_id correlates each Response back to the Command that produced it, allowing concurrent commands per Session.
type ClawkerdService_SessionClient ¶
type ClawkerdService_SessionClient = grpc.BidiStreamingClient[Command, Response]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ClawkerdService_SessionServer ¶
type ClawkerdService_SessionServer = grpc.BidiStreamingServer[Command, Response]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CloseStdin ¶
type CloseStdin struct {
// contains filtered or unexported fields
}
CloseStdin signals EOF on the running command's stage[0] stdin.
func (*CloseStdin) Descriptor
deprecated
func (*CloseStdin) Descriptor() ([]byte, []int)
Deprecated: Use CloseStdin.ProtoReflect.Descriptor instead.
func (*CloseStdin) ProtoMessage ¶
func (*CloseStdin) ProtoMessage()
func (*CloseStdin) ProtoReflect ¶
func (x *CloseStdin) ProtoReflect() protoreflect.Message
func (*CloseStdin) Reset ¶
func (x *CloseStdin) Reset()
func (*CloseStdin) String ¶
func (x *CloseStdin) String() string
type Command ¶
type Command struct {
CommandId string `protobuf:"bytes,1,opt,name=command_id,json=commandId,proto3" json:"command_id,omitempty"`
// Types that are valid to be assigned to Payload:
//
// *Command_Hello
// *Command_Shell
// *Command_Stdin
// *Command_CloseStdin
// *Command_Signal
// *Command_RegisterRequired
// *Command_AgentReady
Payload isCommand_Payload `protobuf_oneof:"payload"`
// contains filtered or unexported fields
}
Command is one CP→clawkerd request. command_id is a CP-generated opaque correlation token; clawkerd echoes it on every Response. Concurrent commands are permitted on a single Session — clawkerd distinguishes them by command_id.
func (*Command) Descriptor
deprecated
func (*Command) GetAgentReady ¶
func (x *Command) GetAgentReady() *AgentReady
func (*Command) GetCloseStdin ¶
func (x *Command) GetCloseStdin() *CloseStdin
func (*Command) GetCommandId ¶
func (*Command) GetPayload ¶
func (x *Command) GetPayload() isCommand_Payload
func (*Command) GetRegisterRequired ¶
func (x *Command) GetRegisterRequired() *RegisterRequired
func (*Command) GetShell ¶
func (x *Command) GetShell() *ShellCommand
func (*Command) ProtoMessage ¶
func (*Command) ProtoMessage()
func (*Command) ProtoReflect ¶
func (x *Command) ProtoReflect() protoreflect.Message
type Command_AgentReady ¶
type Command_AgentReady struct {
AgentReady *AgentReady `protobuf:"bytes,8,opt,name=agent_ready,json=agentReady,proto3,oneof"`
}
type Command_CloseStdin ¶
type Command_CloseStdin struct {
CloseStdin *CloseStdin `protobuf:"bytes,5,opt,name=close_stdin,json=closeStdin,proto3,oneof"`
}
type Command_Hello ¶
type Command_Hello struct {
Hello *Hello `protobuf:"bytes,2,opt,name=hello,proto3,oneof"`
}
type Command_RegisterRequired ¶
type Command_RegisterRequired struct {
RegisterRequired *RegisterRequired `protobuf:"bytes,7,opt,name=register_required,json=registerRequired,proto3,oneof"`
}
type Command_Shell ¶
type Command_Shell struct {
Shell *ShellCommand `protobuf:"bytes,3,opt,name=shell,proto3,oneof"`
}
type Command_Signal ¶
type Command_Signal struct {
Signal *Signal `protobuf:"bytes,6,opt,name=signal,proto3,oneof"`
}
type Command_Stdin ¶
type Command_Stdin struct {
Stdin *Stdin `protobuf:"bytes,4,opt,name=stdin,proto3,oneof"`
}
type Done ¶
type Done struct {
FinalExitCode int32 `protobuf:"varint,1,opt,name=final_exit_code,json=finalExitCode,proto3" json:"final_exit_code,omitempty"`
// contains filtered or unexported fields
}
Done is the terminal Response for a successful ShellCommand. final_exit_code = last stage's exit_code.
func (*Done) Descriptor
deprecated
func (*Done) GetFinalExitCode ¶
func (*Done) ProtoMessage ¶
func (*Done) ProtoMessage()
func (*Done) ProtoReflect ¶
func (x *Done) ProtoReflect() protoreflect.Message
type Error ¶
type Error struct {
Code ErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=clawker.clawkerd.v1.ErrorCode" json:"code,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
Error is the terminal Response for a failed Command.
func (*Error) Descriptor
deprecated
func (*Error) GetMessage ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type ErrorCode ¶
type ErrorCode int32
const ( ErrorCode_ERROR_CODE_UNSPECIFIED ErrorCode = 0 // Stdin / CloseStdin / Signal referencing a command_id that // is not currently running (never started, or already terminal). ErrorCode_ERROR_CODE_UNKNOWN_COMMAND_ID ErrorCode = 1 // Empty argv, contradictory fields, etc. ErrorCode_ERROR_CODE_INVALID_REQUEST ErrorCode = 2 // execve failed (ENOENT, EPERM, EACCES, ...). ErrorCode_ERROR_CODE_SPAWN_FAILED ErrorCode = 3 // Killed because timeout_seconds elapsed. ErrorCode_ERROR_CODE_TIMEOUT ErrorCode = 4 // Pipe between stages broke unexpectedly mid-execution. ErrorCode_ERROR_CODE_IO_ERROR ErrorCode = 5 // Required filesystem entry missing (e.g. AgentReady fifo // never created — distinct from IO_ERROR which covers // syscall failures on existing entries). ErrorCode_ERROR_CODE_NOT_FOUND ErrorCode = 6 )
func (ErrorCode) Descriptor ¶
func (ErrorCode) Descriptor() protoreflect.EnumDescriptor
func (ErrorCode) EnumDescriptor
deprecated
func (ErrorCode) Number ¶
func (x ErrorCode) Number() protoreflect.EnumNumber
func (ErrorCode) Type ¶
func (ErrorCode) Type() protoreflect.EnumType
type Hello ¶
type Hello struct {
// contains filtered or unexported fields
}
Hello is the first Command CP sends after the Session stream opens. clawkerd replies with HelloAck. Liveness is otherwise maintained via gRPC keepalive.
func (*Hello) Descriptor
deprecated
func (*Hello) ProtoMessage ¶
func (*Hello) ProtoMessage()
func (*Hello) ProtoReflect ¶
func (x *Hello) ProtoReflect() protoreflect.Message
type HelloAck ¶
type HelloAck struct {
// contains filtered or unexported fields
}
func (*HelloAck) Descriptor
deprecated
func (*HelloAck) ProtoMessage ¶
func (*HelloAck) ProtoMessage()
func (*HelloAck) ProtoReflect ¶
func (x *HelloAck) ProtoReflect() protoreflect.Message
type PipeStage ¶
type PipeStage struct {
Argv []string `protobuf:"bytes,1,rep,name=argv,proto3" json:"argv,omitempty"`
Uid uint32 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"`
Gid uint32 `protobuf:"varint,3,opt,name=gid,proto3" json:"gid,omitempty"`
Cwd string `protobuf:"bytes,4,opt,name=cwd,proto3" json:"cwd,omitempty"`
Env map[string]string `` /* 133-byte string literal not displayed */
// contains filtered or unexported fields
}
PipeStage is one process in the pipeline. uid/gid drop privileges per stage (e.g. install as root, post-install hook as user).
func (*PipeStage) Descriptor
deprecated
func (*PipeStage) ProtoMessage ¶
func (*PipeStage) ProtoMessage()
func (*PipeStage) ProtoReflect ¶
func (x *PipeStage) ProtoReflect() protoreflect.Message
type RegisterDone ¶
type RegisterDone struct {
Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
// contains filtered or unexported fields
}
RegisterDone is the terminal Response to a RegisterRequired Command. ok=true signals AgentService.Register returned Welcome. ok=false carries the human-readable failure reason in error (Hydra exchange failed, dial failed, Register returned PermissionDenied, etc.).
func (*RegisterDone) Descriptor
deprecated
func (*RegisterDone) Descriptor() ([]byte, []int)
Deprecated: Use RegisterDone.ProtoReflect.Descriptor instead.
func (*RegisterDone) GetError ¶
func (x *RegisterDone) GetError() string
func (*RegisterDone) GetOk ¶
func (x *RegisterDone) GetOk() bool
func (*RegisterDone) ProtoMessage ¶
func (*RegisterDone) ProtoMessage()
func (*RegisterDone) ProtoReflect ¶
func (x *RegisterDone) ProtoReflect() protoreflect.Message
func (*RegisterDone) Reset ¶
func (x *RegisterDone) Reset()
func (*RegisterDone) String ¶
func (x *RegisterDone) String() string
type RegisterRequired ¶
type RegisterRequired struct {
// contains filtered or unexported fields
}
RegisterRequired tells clawkerd to perform the one-time CP-driven Register handshake: exchange the CLI-signed client_assertion JWT at Hydra for an access token, mTLS-dial CP's AgentService, and call Register. Empty payload — the command itself is the signal.
CP sends RegisterRequired when, post-Hello, it observes the agent's container_id is missing from the agentregistry (Miss outcome). clawkerd replies with RegisterDone correlated by command_id.
func (*RegisterRequired) Descriptor
deprecated
func (*RegisterRequired) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequired.ProtoReflect.Descriptor instead.
func (*RegisterRequired) ProtoMessage ¶
func (*RegisterRequired) ProtoMessage()
func (*RegisterRequired) ProtoReflect ¶
func (x *RegisterRequired) ProtoReflect() protoreflect.Message
func (*RegisterRequired) Reset ¶
func (x *RegisterRequired) Reset()
func (*RegisterRequired) String ¶
func (x *RegisterRequired) String() string
type Response ¶
type Response struct {
CommandId string `protobuf:"bytes,1,opt,name=command_id,json=commandId,proto3" json:"command_id,omitempty"`
// Types that are valid to be assigned to Payload:
//
// *Response_HelloAck
// *Response_Started
// *Response_Stdout
// *Response_Stderr
// *Response_StageExit
// *Response_Done
// *Response_Error
// *Response_RegisterDone
Payload isResponse_Payload `protobuf_oneof:"payload"`
// contains filtered or unexported fields
}
Response is one clawkerd→CP message correlated by command_id. Every ShellCommand command_id terminates with exactly one of Done OR Error. HelloAck is the sole terminal Response for a Hello. Stdin / CloseStdin / Signal produce a Started-or-Error Response only on failure (UNKNOWN_COMMAND_ID / INVALID_REQUEST); successful Stdin/CloseStdin/Signal are silent.
func (*Response) Descriptor
deprecated
func (*Response) GetCommandId ¶
func (*Response) GetHelloAck ¶
func (*Response) GetPayload ¶
func (x *Response) GetPayload() isResponse_Payload
func (*Response) GetRegisterDone ¶
func (x *Response) GetRegisterDone() *RegisterDone
func (*Response) GetStageExit ¶
func (*Response) GetStarted ¶
func (*Response) GetStderr ¶
func (x *Response) GetStderr() *StderrChunk
func (*Response) GetStdout ¶
func (x *Response) GetStdout() *StdoutChunk
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type Response_Done ¶
type Response_Done struct {
Done *Done `protobuf:"bytes,7,opt,name=done,proto3,oneof"`
}
type Response_Error ¶
type Response_Error struct {
Error *Error `protobuf:"bytes,8,opt,name=error,proto3,oneof"`
}
type Response_HelloAck ¶
type Response_HelloAck struct {
HelloAck *HelloAck `protobuf:"bytes,2,opt,name=hello_ack,json=helloAck,proto3,oneof"`
}
type Response_RegisterDone ¶
type Response_RegisterDone struct {
RegisterDone *RegisterDone `protobuf:"bytes,9,opt,name=register_done,json=registerDone,proto3,oneof"`
}
type Response_StageExit ¶
type Response_StageExit struct {
StageExit *StageExit `protobuf:"bytes,6,opt,name=stage_exit,json=stageExit,proto3,oneof"`
}
type Response_Started ¶
type Response_Started struct {
Started *Started `protobuf:"bytes,3,opt,name=started,proto3,oneof"`
}
type Response_Stderr ¶
type Response_Stderr struct {
Stderr *StderrChunk `protobuf:"bytes,5,opt,name=stderr,proto3,oneof"`
}
type Response_Stdout ¶
type Response_Stdout struct {
Stdout *StdoutChunk `protobuf:"bytes,4,opt,name=stdout,proto3,oneof"`
}
type ShellCommand ¶
type ShellCommand struct {
Stages []*PipeStage `protobuf:"bytes,1,rep,name=stages,proto3" json:"stages,omitempty"`
// 0 = no timeout. Timeout fires SIGKILL on every stage and
// terminates the command with ERROR_CODE_TIMEOUT.
TimeoutSeconds uint32 `protobuf:"varint,2,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"`
InitialStdin []byte `protobuf:"bytes,3,opt,name=initial_stdin,json=initialStdin,proto3" json:"initial_stdin,omitempty"`
// contains filtered or unexported fields
}
ShellCommand starts a shell pipeline. stages.len == 1 runs a single command; stages.len > 1 chains stage[i].stdout into stage[i+1].stdin (a | b | c). stage[0].stdin is fed by initial_stdin then by subsequent Stdin frames matching this command_id.
func (*ShellCommand) Descriptor
deprecated
func (*ShellCommand) Descriptor() ([]byte, []int)
Deprecated: Use ShellCommand.ProtoReflect.Descriptor instead.
func (*ShellCommand) GetInitialStdin ¶
func (x *ShellCommand) GetInitialStdin() []byte
func (*ShellCommand) GetStages ¶
func (x *ShellCommand) GetStages() []*PipeStage
func (*ShellCommand) GetTimeoutSeconds ¶
func (x *ShellCommand) GetTimeoutSeconds() uint32
func (*ShellCommand) ProtoMessage ¶
func (*ShellCommand) ProtoMessage()
func (*ShellCommand) ProtoReflect ¶
func (x *ShellCommand) ProtoReflect() protoreflect.Message
func (*ShellCommand) Reset ¶
func (x *ShellCommand) Reset()
func (*ShellCommand) String ¶
func (x *ShellCommand) String() string
type Signal ¶
type Signal struct {
Signo int32 `protobuf:"varint,1,opt,name=signo,proto3" json:"signo,omitempty"`
// contains filtered or unexported fields
}
Signal sends a POSIX signal to every stage in the pipeline (or to the single command for stages.len == 1). signo is the numeric signal value (e.g. 9 SIGKILL, 15 SIGTERM, 2 SIGINT).
func (*Signal) Descriptor
deprecated
func (*Signal) ProtoMessage ¶
func (*Signal) ProtoMessage()
func (*Signal) ProtoReflect ¶
func (x *Signal) ProtoReflect() protoreflect.Message
type StageExit ¶
type StageExit struct {
StageIndex uint32 `protobuf:"varint,1,opt,name=stage_index,json=stageIndex,proto3" json:"stage_index,omitempty"`
ExitCode int32 `protobuf:"varint,2,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
Signo int32 `protobuf:"varint,3,opt,name=signo,proto3" json:"signo,omitempty"`
// contains filtered or unexported fields
}
StageExit is emitted as each pipeline stage exits. exit_code is the process exit code; signo is the POSIX signal that killed it (non-zero only for signaled exits, in which case exit_code is -1).
func (*StageExit) Descriptor
deprecated
func (*StageExit) GetExitCode ¶
func (*StageExit) GetStageIndex ¶
func (*StageExit) ProtoMessage ¶
func (*StageExit) ProtoMessage()
func (*StageExit) ProtoReflect ¶
func (x *StageExit) ProtoReflect() protoreflect.Message
type Started ¶
type Started struct {
// contains filtered or unexported fields
}
Started signals that ShellCommand has spawned all stages.
func (*Started) Descriptor
deprecated
func (*Started) ProtoMessage ¶
func (*Started) ProtoMessage()
func (*Started) ProtoReflect ¶
func (x *Started) ProtoReflect() protoreflect.Message
type StderrChunk ¶
type StderrChunk struct {
StageIndex uint32 `protobuf:"varint,1,opt,name=stage_index,json=stageIndex,proto3" json:"stage_index,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
StderrChunk carries bytes from a specific stage's stderr.
func (*StderrChunk) Descriptor
deprecated
func (*StderrChunk) Descriptor() ([]byte, []int)
Deprecated: Use StderrChunk.ProtoReflect.Descriptor instead.
func (*StderrChunk) GetData ¶
func (x *StderrChunk) GetData() []byte
func (*StderrChunk) GetStageIndex ¶
func (x *StderrChunk) GetStageIndex() uint32
func (*StderrChunk) ProtoMessage ¶
func (*StderrChunk) ProtoMessage()
func (*StderrChunk) ProtoReflect ¶
func (x *StderrChunk) ProtoReflect() protoreflect.Message
func (*StderrChunk) Reset ¶
func (x *StderrChunk) Reset()
func (*StderrChunk) String ¶
func (x *StderrChunk) String() string
type Stdin ¶
type Stdin struct {
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
Stdin writes bytes to a running command's stage[0] stdin. Refers to the in-flight ShellCommand by command_id on the parent Command.
func (*Stdin) Descriptor
deprecated
func (*Stdin) ProtoMessage ¶
func (*Stdin) ProtoMessage()
func (*Stdin) ProtoReflect ¶
func (x *Stdin) ProtoReflect() protoreflect.Message
type StdoutChunk ¶
type StdoutChunk struct {
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
StdoutChunk carries bytes from the final stage's stdout.
func (*StdoutChunk) Descriptor
deprecated
func (*StdoutChunk) Descriptor() ([]byte, []int)
Deprecated: Use StdoutChunk.ProtoReflect.Descriptor instead.
func (*StdoutChunk) GetData ¶
func (x *StdoutChunk) GetData() []byte
func (*StdoutChunk) ProtoMessage ¶
func (*StdoutChunk) ProtoMessage()
func (*StdoutChunk) ProtoReflect ¶
func (x *StdoutChunk) ProtoReflect() protoreflect.Message
func (*StdoutChunk) Reset ¶
func (x *StdoutChunk) Reset()
func (*StdoutChunk) String ¶
func (x *StdoutChunk) String() string
type UnimplementedClawkerdServiceServer ¶
type UnimplementedClawkerdServiceServer struct{}
UnimplementedClawkerdServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedClawkerdServiceServer) Session ¶
func (UnimplementedClawkerdServiceServer) Session(grpc.BidiStreamingServer[Command, Response]) error
type UnsafeClawkerdServiceServer ¶
type UnsafeClawkerdServiceServer interface {
// contains filtered or unexported methods
}
UnsafeClawkerdServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ClawkerdServiceServer will result in compilation errors.