Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterNodeAgentServer(s grpc.ServiceRegistrar, srv NodeAgentServer)
- type ExecuteRequest
- func (*ExecuteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ExecuteRequest) GetCommand() string
- func (x *ExecuteRequest) GetDetach() bool
- func (x *ExecuteRequest) GetEnv() map[string]string
- func (x *ExecuteRequest) GetShell() string
- func (x *ExecuteRequest) GetTimeoutSeconds() int32
- func (x *ExecuteRequest) GetWorkingDir() string
- func (*ExecuteRequest) ProtoMessage()
- func (x *ExecuteRequest) ProtoReflect() protoreflect.Message
- func (x *ExecuteRequest) Reset()
- func (x *ExecuteRequest) String() string
- type ExecuteResponse
- func (*ExecuteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ExecuteResponse) GetData() []byte
- func (x *ExecuteResponse) GetDone() bool
- func (x *ExecuteResponse) GetExitCode() int32
- func (x *ExecuteResponse) GetPid() int32
- func (x *ExecuteResponse) GetStream() ExecuteResponse_Stream
- func (*ExecuteResponse) ProtoMessage()
- func (x *ExecuteResponse) ProtoReflect() protoreflect.Message
- func (x *ExecuteResponse) Reset()
- func (x *ExecuteResponse) String() string
- type ExecuteResponse_Stream
- func (ExecuteResponse_Stream) Descriptor() protoreflect.EnumDescriptor
- func (x ExecuteResponse_Stream) Enum() *ExecuteResponse_Stream
- func (ExecuteResponse_Stream) EnumDescriptor() ([]byte, []int)deprecated
- func (x ExecuteResponse_Stream) Number() protoreflect.EnumNumber
- func (x ExecuteResponse_Stream) String() string
- func (ExecuteResponse_Stream) Type() protoreflect.EnumType
- type ExecuteScriptRequest
- func (*ExecuteScriptRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ExecuteScriptRequest) GetArgs() []string
- func (x *ExecuteScriptRequest) GetEnv() map[string]string
- func (x *ExecuteScriptRequest) GetScriptBody() string
- func (x *ExecuteScriptRequest) GetShell() string
- func (x *ExecuteScriptRequest) GetTimeoutSeconds() int32
- func (x *ExecuteScriptRequest) GetWorkingDir() string
- func (*ExecuteScriptRequest) ProtoMessage()
- func (x *ExecuteScriptRequest) ProtoReflect() protoreflect.Message
- func (x *ExecuteScriptRequest) Reset()
- func (x *ExecuteScriptRequest) String() string
- type GetInfoRequest
- type GetInfoResponse
- func (*GetInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetInfoResponse) GetAgentVersion() string
- func (x *GetInfoResponse) GetArch() string
- func (x *GetInfoResponse) GetCpuCount() int32
- func (x *GetInfoResponse) GetHostname() string
- func (x *GetInfoResponse) GetMemoryBytes() int64
- func (x *GetInfoResponse) GetOs() string
- func (*GetInfoResponse) ProtoMessage()
- func (x *GetInfoResponse) ProtoReflect() protoreflect.Message
- func (x *GetInfoResponse) Reset()
- func (x *GetInfoResponse) String() string
- type KillProcessRequest
- func (*KillProcessRequest) Descriptor() ([]byte, []int)deprecated
- func (x *KillProcessRequest) GetForce() bool
- func (x *KillProcessRequest) GetPid() int32
- func (*KillProcessRequest) ProtoMessage()
- func (x *KillProcessRequest) ProtoReflect() protoreflect.Message
- func (x *KillProcessRequest) Reset()
- func (x *KillProcessRequest) String() string
- type KillProcessResponse
- func (*KillProcessResponse) Descriptor() ([]byte, []int)deprecated
- func (x *KillProcessResponse) GetMessage() string
- func (x *KillProcessResponse) GetSuccess() bool
- func (*KillProcessResponse) ProtoMessage()
- func (x *KillProcessResponse) ProtoReflect() protoreflect.Message
- func (x *KillProcessResponse) Reset()
- func (x *KillProcessResponse) String() string
- type ListProcessesRequest
- func (*ListProcessesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListProcessesRequest) GetNameFilter() string
- func (*ListProcessesRequest) ProtoMessage()
- func (x *ListProcessesRequest) ProtoReflect() protoreflect.Message
- func (x *ListProcessesRequest) Reset()
- func (x *ListProcessesRequest) String() string
- type ListProcessesResponse
- func (*ListProcessesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListProcessesResponse) GetProcesses() []*ProcessInfo
- func (*ListProcessesResponse) ProtoMessage()
- func (x *ListProcessesResponse) ProtoReflect() protoreflect.Message
- func (x *ListProcessesResponse) Reset()
- func (x *ListProcessesResponse) String() string
- type NodeAgentClient
- type NodeAgentServer
- type NodeAgent_ExecuteClient
- type NodeAgent_ExecuteScriptClient
- type NodeAgent_ExecuteScriptServer
- type NodeAgent_ExecuteServer
- type NodeAgent_PullFileClient
- type NodeAgent_PullFileServer
- type NodeAgent_PushFileClient
- type NodeAgent_PushFileServer
- type ProcessInfo
- func (*ProcessInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessInfo) GetCommandLine() string
- func (x *ProcessInfo) GetCpuPercent() float64
- func (x *ProcessInfo) GetMemoryBytes() int64
- func (x *ProcessInfo) GetName() string
- func (x *ProcessInfo) GetPid() int32
- func (*ProcessInfo) ProtoMessage()
- func (x *ProcessInfo) ProtoReflect() protoreflect.Message
- func (x *ProcessInfo) Reset()
- func (x *ProcessInfo) String() string
- type PullFileRequest
- type PullFileResponse
- func (*PullFileResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PullFileResponse) GetChunk() []byte
- func (x *PullFileResponse) GetTotalSize() int64
- func (*PullFileResponse) ProtoMessage()
- func (x *PullFileResponse) ProtoReflect() protoreflect.Message
- func (x *PullFileResponse) Reset()
- func (x *PullFileResponse) String() string
- type PushFileRequest
- func (*PushFileRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PushFileRequest) GetChunk() []byte
- func (x *PushFileRequest) GetFileSize() int64
- func (x *PushFileRequest) GetIsLast() bool
- func (x *PushFileRequest) GetRemotePath() string
- func (*PushFileRequest) ProtoMessage()
- func (x *PushFileRequest) ProtoReflect() protoreflect.Message
- func (x *PushFileRequest) Reset()
- func (x *PushFileRequest) String() string
- type PushFileResponse
- func (*PushFileResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PushFileResponse) GetBytesWritten() int64
- func (x *PushFileResponse) GetRemotePath() string
- func (*PushFileResponse) ProtoMessage()
- func (x *PushFileResponse) ProtoReflect() protoreflect.Message
- func (x *PushFileResponse) Reset()
- func (x *PushFileResponse) String() string
- type UnimplementedNodeAgentServer
- func (UnimplementedNodeAgentServer) Execute(*ExecuteRequest, grpc.ServerStreamingServer[ExecuteResponse]) error
- func (UnimplementedNodeAgentServer) ExecuteScript(*ExecuteScriptRequest, grpc.ServerStreamingServer[ExecuteResponse]) error
- func (UnimplementedNodeAgentServer) GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error)
- func (UnimplementedNodeAgentServer) KillProcess(context.Context, *KillProcessRequest) (*KillProcessResponse, error)
- func (UnimplementedNodeAgentServer) ListProcesses(context.Context, *ListProcessesRequest) (*ListProcessesResponse, error)
- func (UnimplementedNodeAgentServer) PullFile(*PullFileRequest, grpc.ServerStreamingServer[PullFileResponse]) error
- func (UnimplementedNodeAgentServer) PushFile(grpc.ClientStreamingServer[PushFileRequest, PushFileResponse]) error
- type UnsafeNodeAgentServer
Constants ¶
const ( NodeAgent_Execute_FullMethodName = "/agent.NodeAgent/Execute" NodeAgent_ExecuteScript_FullMethodName = "/agent.NodeAgent/ExecuteScript" NodeAgent_PushFile_FullMethodName = "/agent.NodeAgent/PushFile" NodeAgent_PullFile_FullMethodName = "/agent.NodeAgent/PullFile" NodeAgent_ListProcesses_FullMethodName = "/agent.NodeAgent/ListProcesses" NodeAgent_KillProcess_FullMethodName = "/agent.NodeAgent/KillProcess" NodeAgent_GetInfo_FullMethodName = "/agent.NodeAgent/GetInfo" )
Variables ¶
var ( ExecuteResponse_Stream_name = map[int32]string{ 0: "STDOUT", 1: "STDERR", } ExecuteResponse_Stream_value = map[string]int32{ "STDOUT": 0, "STDERR": 1, } )
Enum value maps for ExecuteResponse_Stream.
var File_proto_agent_agent_proto protoreflect.FileDescriptor
var NodeAgent_ServiceDesc = grpc.ServiceDesc{ ServiceName: "agent.NodeAgent", HandlerType: (*NodeAgentServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListProcesses", Handler: _NodeAgent_ListProcesses_Handler, }, { MethodName: "KillProcess", Handler: _NodeAgent_KillProcess_Handler, }, { MethodName: "GetInfo", Handler: _NodeAgent_GetInfo_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Execute", Handler: _NodeAgent_Execute_Handler, ServerStreams: true, }, { StreamName: "ExecuteScript", Handler: _NodeAgent_ExecuteScript_Handler, ServerStreams: true, }, { StreamName: "PushFile", Handler: _NodeAgent_PushFile_Handler, ClientStreams: true, }, { StreamName: "PullFile", Handler: _NodeAgent_PullFile_Handler, ServerStreams: true, }, }, Metadata: "proto/agent/agent.proto", }
NodeAgent_ServiceDesc is the grpc.ServiceDesc for NodeAgent service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterNodeAgentServer ¶
func RegisterNodeAgentServer(s grpc.ServiceRegistrar, srv NodeAgentServer)
Types ¶
type ExecuteRequest ¶
type ExecuteRequest struct {
Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
Shell string `protobuf:"bytes,2,opt,name=shell,proto3" json:"shell,omitempty"` // "powershell", "cmd", "bash" (auto-detect if empty)
WorkingDir string `protobuf:"bytes,3,opt,name=working_dir,json=workingDir,proto3" json:"working_dir,omitempty"`
Env map[string]string `` /* 133-byte string literal not displayed */
TimeoutSeconds int32 `protobuf:"varint,5,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"` // 0 = no timeout
Detach bool `protobuf:"varint,6,opt,name=detach,proto3" json:"detach,omitempty"` // Start detached (survives agent restart)
// contains filtered or unexported fields
}
func (*ExecuteRequest) Descriptor
deprecated
func (*ExecuteRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExecuteRequest.ProtoReflect.Descriptor instead.
func (*ExecuteRequest) GetCommand ¶
func (x *ExecuteRequest) GetCommand() string
func (*ExecuteRequest) GetDetach ¶
func (x *ExecuteRequest) GetDetach() bool
func (*ExecuteRequest) GetEnv ¶
func (x *ExecuteRequest) GetEnv() map[string]string
func (*ExecuteRequest) GetShell ¶
func (x *ExecuteRequest) GetShell() string
func (*ExecuteRequest) GetTimeoutSeconds ¶
func (x *ExecuteRequest) GetTimeoutSeconds() int32
func (*ExecuteRequest) GetWorkingDir ¶
func (x *ExecuteRequest) GetWorkingDir() string
func (*ExecuteRequest) ProtoMessage ¶
func (*ExecuteRequest) ProtoMessage()
func (*ExecuteRequest) ProtoReflect ¶
func (x *ExecuteRequest) ProtoReflect() protoreflect.Message
func (*ExecuteRequest) Reset ¶
func (x *ExecuteRequest) Reset()
func (*ExecuteRequest) String ¶
func (x *ExecuteRequest) String() string
type ExecuteResponse ¶
type ExecuteResponse struct {
Stream ExecuteResponse_Stream `protobuf:"varint,1,opt,name=stream,proto3,enum=agent.ExecuteResponse_Stream" json:"stream,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
Done bool `protobuf:"varint,3,opt,name=done,proto3" json:"done,omitempty"`
ExitCode int32 `protobuf:"varint,4,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` // Valid when done=true
Pid int32 `protobuf:"varint,5,opt,name=pid,proto3" json:"pid,omitempty"` // PID of spawned process (sent in first message)
// contains filtered or unexported fields
}
func (*ExecuteResponse) Descriptor
deprecated
func (*ExecuteResponse) Descriptor() ([]byte, []int)
Deprecated: Use ExecuteResponse.ProtoReflect.Descriptor instead.
func (*ExecuteResponse) GetData ¶
func (x *ExecuteResponse) GetData() []byte
func (*ExecuteResponse) GetDone ¶
func (x *ExecuteResponse) GetDone() bool
func (*ExecuteResponse) GetExitCode ¶
func (x *ExecuteResponse) GetExitCode() int32
func (*ExecuteResponse) GetPid ¶
func (x *ExecuteResponse) GetPid() int32
func (*ExecuteResponse) GetStream ¶
func (x *ExecuteResponse) GetStream() ExecuteResponse_Stream
func (*ExecuteResponse) ProtoMessage ¶
func (*ExecuteResponse) ProtoMessage()
func (*ExecuteResponse) ProtoReflect ¶
func (x *ExecuteResponse) ProtoReflect() protoreflect.Message
func (*ExecuteResponse) Reset ¶
func (x *ExecuteResponse) Reset()
func (*ExecuteResponse) String ¶
func (x *ExecuteResponse) String() string
type ExecuteResponse_Stream ¶
type ExecuteResponse_Stream int32
const ( ExecuteResponse_STDOUT ExecuteResponse_Stream = 0 ExecuteResponse_STDERR ExecuteResponse_Stream = 1 )
func (ExecuteResponse_Stream) Descriptor ¶
func (ExecuteResponse_Stream) Descriptor() protoreflect.EnumDescriptor
func (ExecuteResponse_Stream) Enum ¶
func (x ExecuteResponse_Stream) Enum() *ExecuteResponse_Stream
func (ExecuteResponse_Stream) EnumDescriptor
deprecated
func (ExecuteResponse_Stream) EnumDescriptor() ([]byte, []int)
Deprecated: Use ExecuteResponse_Stream.Descriptor instead.
func (ExecuteResponse_Stream) Number ¶
func (x ExecuteResponse_Stream) Number() protoreflect.EnumNumber
func (ExecuteResponse_Stream) String ¶
func (x ExecuteResponse_Stream) String() string
func (ExecuteResponse_Stream) Type ¶
func (ExecuteResponse_Stream) Type() protoreflect.EnumType
type ExecuteScriptRequest ¶
type ExecuteScriptRequest struct {
ScriptBody string `protobuf:"bytes,1,opt,name=script_body,json=scriptBody,proto3" json:"script_body,omitempty"` // Inline script content
Shell string `protobuf:"bytes,2,opt,name=shell,proto3" json:"shell,omitempty"` // "powershell", "bash" (auto-detect if empty)
WorkingDir string `protobuf:"bytes,3,opt,name=working_dir,json=workingDir,proto3" json:"working_dir,omitempty"`
Env map[string]string `` /* 133-byte string literal not displayed */
TimeoutSeconds int32 `protobuf:"varint,5,opt,name=timeout_seconds,json=timeoutSeconds,proto3" json:"timeout_seconds,omitempty"`
Args []string `protobuf:"bytes,6,rep,name=args,proto3" json:"args,omitempty"` // Script arguments
// contains filtered or unexported fields
}
func (*ExecuteScriptRequest) Descriptor
deprecated
func (*ExecuteScriptRequest) Descriptor() ([]byte, []int)
Deprecated: Use ExecuteScriptRequest.ProtoReflect.Descriptor instead.
func (*ExecuteScriptRequest) GetArgs ¶
func (x *ExecuteScriptRequest) GetArgs() []string
func (*ExecuteScriptRequest) GetEnv ¶
func (x *ExecuteScriptRequest) GetEnv() map[string]string
func (*ExecuteScriptRequest) GetScriptBody ¶
func (x *ExecuteScriptRequest) GetScriptBody() string
func (*ExecuteScriptRequest) GetShell ¶
func (x *ExecuteScriptRequest) GetShell() string
func (*ExecuteScriptRequest) GetTimeoutSeconds ¶
func (x *ExecuteScriptRequest) GetTimeoutSeconds() int32
func (*ExecuteScriptRequest) GetWorkingDir ¶
func (x *ExecuteScriptRequest) GetWorkingDir() string
func (*ExecuteScriptRequest) ProtoMessage ¶
func (*ExecuteScriptRequest) ProtoMessage()
func (*ExecuteScriptRequest) ProtoReflect ¶
func (x *ExecuteScriptRequest) ProtoReflect() protoreflect.Message
func (*ExecuteScriptRequest) Reset ¶
func (x *ExecuteScriptRequest) Reset()
func (*ExecuteScriptRequest) String ¶
func (x *ExecuteScriptRequest) String() string
type GetInfoRequest ¶
type GetInfoRequest struct {
// contains filtered or unexported fields
}
func (*GetInfoRequest) Descriptor
deprecated
func (*GetInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetInfoRequest.ProtoReflect.Descriptor instead.
func (*GetInfoRequest) ProtoMessage ¶
func (*GetInfoRequest) ProtoMessage()
func (*GetInfoRequest) ProtoReflect ¶
func (x *GetInfoRequest) ProtoReflect() protoreflect.Message
func (*GetInfoRequest) Reset ¶
func (x *GetInfoRequest) Reset()
func (*GetInfoRequest) String ¶
func (x *GetInfoRequest) String() string
type GetInfoResponse ¶
type GetInfoResponse struct {
Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
Os string `protobuf:"bytes,2,opt,name=os,proto3" json:"os,omitempty"` // "windows" or "linux"
Arch string `protobuf:"bytes,3,opt,name=arch,proto3" json:"arch,omitempty"` // "amd64", "arm64"
CpuCount int32 `protobuf:"varint,4,opt,name=cpu_count,json=cpuCount,proto3" json:"cpu_count,omitempty"`
MemoryBytes int64 `protobuf:"varint,5,opt,name=memory_bytes,json=memoryBytes,proto3" json:"memory_bytes,omitempty"`
AgentVersion string `protobuf:"bytes,6,opt,name=agent_version,json=agentVersion,proto3" json:"agent_version,omitempty"`
// contains filtered or unexported fields
}
func (*GetInfoResponse) Descriptor
deprecated
func (*GetInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetInfoResponse.ProtoReflect.Descriptor instead.
func (*GetInfoResponse) GetAgentVersion ¶
func (x *GetInfoResponse) GetAgentVersion() string
func (*GetInfoResponse) GetArch ¶
func (x *GetInfoResponse) GetArch() string
func (*GetInfoResponse) GetCpuCount ¶
func (x *GetInfoResponse) GetCpuCount() int32
func (*GetInfoResponse) GetHostname ¶
func (x *GetInfoResponse) GetHostname() string
func (*GetInfoResponse) GetMemoryBytes ¶
func (x *GetInfoResponse) GetMemoryBytes() int64
func (*GetInfoResponse) GetOs ¶
func (x *GetInfoResponse) GetOs() string
func (*GetInfoResponse) ProtoMessage ¶
func (*GetInfoResponse) ProtoMessage()
func (*GetInfoResponse) ProtoReflect ¶
func (x *GetInfoResponse) ProtoReflect() protoreflect.Message
func (*GetInfoResponse) Reset ¶
func (x *GetInfoResponse) Reset()
func (*GetInfoResponse) String ¶
func (x *GetInfoResponse) String() string
type KillProcessRequest ¶
type KillProcessRequest struct {
Pid int32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"`
Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` // SIGKILL / TerminateProcess
// contains filtered or unexported fields
}
func (*KillProcessRequest) Descriptor
deprecated
func (*KillProcessRequest) Descriptor() ([]byte, []int)
Deprecated: Use KillProcessRequest.ProtoReflect.Descriptor instead.
func (*KillProcessRequest) GetForce ¶
func (x *KillProcessRequest) GetForce() bool
func (*KillProcessRequest) GetPid ¶
func (x *KillProcessRequest) GetPid() int32
func (*KillProcessRequest) ProtoMessage ¶
func (*KillProcessRequest) ProtoMessage()
func (*KillProcessRequest) ProtoReflect ¶
func (x *KillProcessRequest) ProtoReflect() protoreflect.Message
func (*KillProcessRequest) Reset ¶
func (x *KillProcessRequest) Reset()
func (*KillProcessRequest) String ¶
func (x *KillProcessRequest) String() string
type KillProcessResponse ¶
type KillProcessResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
func (*KillProcessResponse) Descriptor
deprecated
func (*KillProcessResponse) Descriptor() ([]byte, []int)
Deprecated: Use KillProcessResponse.ProtoReflect.Descriptor instead.
func (*KillProcessResponse) GetMessage ¶
func (x *KillProcessResponse) GetMessage() string
func (*KillProcessResponse) GetSuccess ¶
func (x *KillProcessResponse) GetSuccess() bool
func (*KillProcessResponse) ProtoMessage ¶
func (*KillProcessResponse) ProtoMessage()
func (*KillProcessResponse) ProtoReflect ¶
func (x *KillProcessResponse) ProtoReflect() protoreflect.Message
func (*KillProcessResponse) Reset ¶
func (x *KillProcessResponse) Reset()
func (*KillProcessResponse) String ¶
func (x *KillProcessResponse) String() string
type ListProcessesRequest ¶
type ListProcessesRequest struct {
NameFilter string `protobuf:"bytes,1,opt,name=name_filter,json=nameFilter,proto3" json:"name_filter,omitempty"` // Optional substring filter on process name
// contains filtered or unexported fields
}
func (*ListProcessesRequest) Descriptor
deprecated
func (*ListProcessesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListProcessesRequest.ProtoReflect.Descriptor instead.
func (*ListProcessesRequest) GetNameFilter ¶
func (x *ListProcessesRequest) GetNameFilter() string
func (*ListProcessesRequest) ProtoMessage ¶
func (*ListProcessesRequest) ProtoMessage()
func (*ListProcessesRequest) ProtoReflect ¶
func (x *ListProcessesRequest) ProtoReflect() protoreflect.Message
func (*ListProcessesRequest) Reset ¶
func (x *ListProcessesRequest) Reset()
func (*ListProcessesRequest) String ¶
func (x *ListProcessesRequest) String() string
type ListProcessesResponse ¶
type ListProcessesResponse struct {
Processes []*ProcessInfo `protobuf:"bytes,1,rep,name=processes,proto3" json:"processes,omitempty"`
// contains filtered or unexported fields
}
func (*ListProcessesResponse) Descriptor
deprecated
func (*ListProcessesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListProcessesResponse.ProtoReflect.Descriptor instead.
func (*ListProcessesResponse) GetProcesses ¶
func (x *ListProcessesResponse) GetProcesses() []*ProcessInfo
func (*ListProcessesResponse) ProtoMessage ¶
func (*ListProcessesResponse) ProtoMessage()
func (*ListProcessesResponse) ProtoReflect ¶
func (x *ListProcessesResponse) ProtoReflect() protoreflect.Message
func (*ListProcessesResponse) Reset ¶
func (x *ListProcessesResponse) Reset()
func (*ListProcessesResponse) String ¶
func (x *ListProcessesResponse) String() string
type NodeAgentClient ¶
type NodeAgentClient interface {
// Execute a command and stream stdout/stderr back in real-time.
Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ExecuteResponse], error)
// Execute an inline script (pushed as temp file, executed, cleaned up).
ExecuteScript(ctx context.Context, in *ExecuteScriptRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ExecuteResponse], error)
// Push a file from MCP server to the agent node.
PushFile(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[PushFileRequest, PushFileResponse], error)
// Pull a file from the agent node to the MCP server.
PullFile(ctx context.Context, in *PullFileRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PullFileResponse], error)
// List running processes.
ListProcesses(ctx context.Context, in *ListProcessesRequest, opts ...grpc.CallOption) (*ListProcessesResponse, error)
// Kill a process by PID.
KillProcess(ctx context.Context, in *KillProcessRequest, opts ...grpc.CallOption) (*KillProcessResponse, error)
// Health check and node metadata.
GetInfo(ctx context.Context, in *GetInfoRequest, opts ...grpc.CallOption) (*GetInfoResponse, error)
}
NodeAgentClient is the client API for NodeAgent 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.
func NewNodeAgentClient ¶
func NewNodeAgentClient(cc grpc.ClientConnInterface) NodeAgentClient
type NodeAgentServer ¶
type NodeAgentServer interface {
// Execute a command and stream stdout/stderr back in real-time.
Execute(*ExecuteRequest, grpc.ServerStreamingServer[ExecuteResponse]) error
// Execute an inline script (pushed as temp file, executed, cleaned up).
ExecuteScript(*ExecuteScriptRequest, grpc.ServerStreamingServer[ExecuteResponse]) error
// Push a file from MCP server to the agent node.
PushFile(grpc.ClientStreamingServer[PushFileRequest, PushFileResponse]) error
// Pull a file from the agent node to the MCP server.
PullFile(*PullFileRequest, grpc.ServerStreamingServer[PullFileResponse]) error
// List running processes.
ListProcesses(context.Context, *ListProcessesRequest) (*ListProcessesResponse, error)
// Kill a process by PID.
KillProcess(context.Context, *KillProcessRequest) (*KillProcessResponse, error)
// Health check and node metadata.
GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error)
// contains filtered or unexported methods
}
NodeAgentServer is the server API for NodeAgent service. All implementations must embed UnimplementedNodeAgentServer for forward compatibility.
type NodeAgent_ExecuteClient ¶
type NodeAgent_ExecuteClient = grpc.ServerStreamingClient[ExecuteResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type NodeAgent_ExecuteScriptClient ¶
type NodeAgent_ExecuteScriptClient = grpc.ServerStreamingClient[ExecuteResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type NodeAgent_ExecuteScriptServer ¶
type NodeAgent_ExecuteScriptServer = grpc.ServerStreamingServer[ExecuteResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type NodeAgent_ExecuteServer ¶
type NodeAgent_ExecuteServer = grpc.ServerStreamingServer[ExecuteResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type NodeAgent_PullFileClient ¶
type NodeAgent_PullFileClient = grpc.ServerStreamingClient[PullFileResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type NodeAgent_PullFileServer ¶
type NodeAgent_PullFileServer = grpc.ServerStreamingServer[PullFileResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type NodeAgent_PushFileClient ¶
type NodeAgent_PushFileClient = grpc.ClientStreamingClient[PushFileRequest, PushFileResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type NodeAgent_PushFileServer ¶
type NodeAgent_PushFileServer = grpc.ClientStreamingServer[PushFileRequest, PushFileResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ProcessInfo ¶
type ProcessInfo struct {
Pid int32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
CommandLine string `protobuf:"bytes,3,opt,name=command_line,json=commandLine,proto3" json:"command_line,omitempty"`
MemoryBytes int64 `protobuf:"varint,4,opt,name=memory_bytes,json=memoryBytes,proto3" json:"memory_bytes,omitempty"`
CpuPercent float64 `protobuf:"fixed64,5,opt,name=cpu_percent,json=cpuPercent,proto3" json:"cpu_percent,omitempty"`
// contains filtered or unexported fields
}
func (*ProcessInfo) Descriptor
deprecated
func (*ProcessInfo) Descriptor() ([]byte, []int)
Deprecated: Use ProcessInfo.ProtoReflect.Descriptor instead.
func (*ProcessInfo) GetCommandLine ¶
func (x *ProcessInfo) GetCommandLine() string
func (*ProcessInfo) GetCpuPercent ¶
func (x *ProcessInfo) GetCpuPercent() float64
func (*ProcessInfo) GetMemoryBytes ¶
func (x *ProcessInfo) GetMemoryBytes() int64
func (*ProcessInfo) GetName ¶
func (x *ProcessInfo) GetName() string
func (*ProcessInfo) GetPid ¶
func (x *ProcessInfo) GetPid() int32
func (*ProcessInfo) ProtoMessage ¶
func (*ProcessInfo) ProtoMessage()
func (*ProcessInfo) ProtoReflect ¶
func (x *ProcessInfo) ProtoReflect() protoreflect.Message
func (*ProcessInfo) Reset ¶
func (x *ProcessInfo) Reset()
func (*ProcessInfo) String ¶
func (x *ProcessInfo) String() string
type PullFileRequest ¶
type PullFileRequest struct {
RemotePath string `protobuf:"bytes,1,opt,name=remote_path,json=remotePath,proto3" json:"remote_path,omitempty"` // File path on the agent node
// contains filtered or unexported fields
}
func (*PullFileRequest) Descriptor
deprecated
func (*PullFileRequest) Descriptor() ([]byte, []int)
Deprecated: Use PullFileRequest.ProtoReflect.Descriptor instead.
func (*PullFileRequest) GetRemotePath ¶
func (x *PullFileRequest) GetRemotePath() string
func (*PullFileRequest) ProtoMessage ¶
func (*PullFileRequest) ProtoMessage()
func (*PullFileRequest) ProtoReflect ¶
func (x *PullFileRequest) ProtoReflect() protoreflect.Message
func (*PullFileRequest) Reset ¶
func (x *PullFileRequest) Reset()
func (*PullFileRequest) String ¶
func (x *PullFileRequest) String() string
type PullFileResponse ¶
type PullFileResponse struct {
Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` // File data chunk
TotalSize int64 `protobuf:"varint,2,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` // Total file size (sent in first message)
// contains filtered or unexported fields
}
func (*PullFileResponse) Descriptor
deprecated
func (*PullFileResponse) Descriptor() ([]byte, []int)
Deprecated: Use PullFileResponse.ProtoReflect.Descriptor instead.
func (*PullFileResponse) GetChunk ¶
func (x *PullFileResponse) GetChunk() []byte
func (*PullFileResponse) GetTotalSize ¶
func (x *PullFileResponse) GetTotalSize() int64
func (*PullFileResponse) ProtoMessage ¶
func (*PullFileResponse) ProtoMessage()
func (*PullFileResponse) ProtoReflect ¶
func (x *PullFileResponse) ProtoReflect() protoreflect.Message
func (*PullFileResponse) Reset ¶
func (x *PullFileResponse) Reset()
func (*PullFileResponse) String ¶
func (x *PullFileResponse) String() string
type PushFileRequest ¶
type PushFileRequest struct {
RemotePath string `protobuf:"bytes,1,opt,name=remote_path,json=remotePath,proto3" json:"remote_path,omitempty"` // Destination path on the agent node
Chunk []byte `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"` // File data chunk (64KB)
IsLast bool `protobuf:"varint,3,opt,name=is_last,json=isLast,proto3" json:"is_last,omitempty"` // True for the final chunk
FileSize int64 `protobuf:"varint,4,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty"` // Total size (sent in first message, 0 if unknown)
// contains filtered or unexported fields
}
func (*PushFileRequest) Descriptor
deprecated
func (*PushFileRequest) Descriptor() ([]byte, []int)
Deprecated: Use PushFileRequest.ProtoReflect.Descriptor instead.
func (*PushFileRequest) GetChunk ¶
func (x *PushFileRequest) GetChunk() []byte
func (*PushFileRequest) GetFileSize ¶
func (x *PushFileRequest) GetFileSize() int64
func (*PushFileRequest) GetIsLast ¶
func (x *PushFileRequest) GetIsLast() bool
func (*PushFileRequest) GetRemotePath ¶
func (x *PushFileRequest) GetRemotePath() string
func (*PushFileRequest) ProtoMessage ¶
func (*PushFileRequest) ProtoMessage()
func (*PushFileRequest) ProtoReflect ¶
func (x *PushFileRequest) ProtoReflect() protoreflect.Message
func (*PushFileRequest) Reset ¶
func (x *PushFileRequest) Reset()
func (*PushFileRequest) String ¶
func (x *PushFileRequest) String() string
type PushFileResponse ¶
type PushFileResponse struct {
BytesWritten int64 `protobuf:"varint,1,opt,name=bytes_written,json=bytesWritten,proto3" json:"bytes_written,omitempty"`
RemotePath string `protobuf:"bytes,2,opt,name=remote_path,json=remotePath,proto3" json:"remote_path,omitempty"`
// contains filtered or unexported fields
}
func (*PushFileResponse) Descriptor
deprecated
func (*PushFileResponse) Descriptor() ([]byte, []int)
Deprecated: Use PushFileResponse.ProtoReflect.Descriptor instead.
func (*PushFileResponse) GetBytesWritten ¶
func (x *PushFileResponse) GetBytesWritten() int64
func (*PushFileResponse) GetRemotePath ¶
func (x *PushFileResponse) GetRemotePath() string
func (*PushFileResponse) ProtoMessage ¶
func (*PushFileResponse) ProtoMessage()
func (*PushFileResponse) ProtoReflect ¶
func (x *PushFileResponse) ProtoReflect() protoreflect.Message
func (*PushFileResponse) Reset ¶
func (x *PushFileResponse) Reset()
func (*PushFileResponse) String ¶
func (x *PushFileResponse) String() string
type UnimplementedNodeAgentServer ¶
type UnimplementedNodeAgentServer struct{}
UnimplementedNodeAgentServer 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 (UnimplementedNodeAgentServer) Execute ¶
func (UnimplementedNodeAgentServer) Execute(*ExecuteRequest, grpc.ServerStreamingServer[ExecuteResponse]) error
func (UnimplementedNodeAgentServer) ExecuteScript ¶
func (UnimplementedNodeAgentServer) ExecuteScript(*ExecuteScriptRequest, grpc.ServerStreamingServer[ExecuteResponse]) error
func (UnimplementedNodeAgentServer) GetInfo ¶
func (UnimplementedNodeAgentServer) GetInfo(context.Context, *GetInfoRequest) (*GetInfoResponse, error)
func (UnimplementedNodeAgentServer) KillProcess ¶
func (UnimplementedNodeAgentServer) KillProcess(context.Context, *KillProcessRequest) (*KillProcessResponse, error)
func (UnimplementedNodeAgentServer) ListProcesses ¶
func (UnimplementedNodeAgentServer) ListProcesses(context.Context, *ListProcessesRequest) (*ListProcessesResponse, error)
func (UnimplementedNodeAgentServer) PullFile ¶
func (UnimplementedNodeAgentServer) PullFile(*PullFileRequest, grpc.ServerStreamingServer[PullFileResponse]) error
func (UnimplementedNodeAgentServer) PushFile ¶
func (UnimplementedNodeAgentServer) PushFile(grpc.ClientStreamingServer[PushFileRequest, PushFileResponse]) error
type UnsafeNodeAgentServer ¶
type UnsafeNodeAgentServer interface {
// contains filtered or unexported methods
}
UnsafeNodeAgentServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NodeAgentServer will result in compilation errors.