Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterCollectorServiceServer(s grpc.ServiceRegistrar, srv CollectorServiceServer)
- type Auth
- func (*Auth) Descriptor() ([]byte, []int)deprecated
- func (x *Auth) GetTeamId() string
- func (x *Auth) GetUserEmail() string
- func (x *Auth) GetUserId() string
- func (x *Auth) GetWorkspaceId() string
- func (*Auth) ProtoMessage()
- func (x *Auth) ProtoReflect() protoreflect.Message
- func (x *Auth) Reset()
- func (x *Auth) String() string
- type CollectorServiceClient
- type CollectorServiceServer
- type Command
- func (*Command) Descriptor() ([]byte, []int)deprecated
- func (x *Command) GetCategory() string
- func (x *Command) GetCommand() string
- func (x *Command) GetDirectory() string
- func (x *Command) GetEndTime() int64
- func (x *Command) GetExecutionTime() int64
- func (x *Command) GetId() int64
- func (x *Command) GetPid() int64
- func (x *Command) GetRepository() string
- func (x *Command) GetResult() string
- func (x *Command) GetStartTime() int64
- func (x *Command) GetStatus() string
- func (x *Command) GetUser() string
- func (*Command) ProtoMessage()
- func (x *Command) ProtoReflect() protoreflect.Message
- func (x *Command) Reset()
- func (x *Command) String() string
- type Process
- func (*Process) Descriptor() ([]byte, []int)deprecated
- func (x *Process) GetCpuUsage() float64
- func (x *Process) GetCreatedTime() int64
- func (x *Process) GetId() int64
- func (x *Process) GetMemoryUsage() float64
- func (x *Process) GetName() string
- func (x *Process) GetOs() string
- func (x *Process) GetPid() int64
- func (x *Process) GetPlatform() string
- func (x *Process) GetPlatformFamily() string
- func (x *Process) GetPpid() int64
- func (x *Process) GetStatus() string
- func (x *Process) GetStoredTime() int64
- func (*Process) ProtoMessage()
- func (x *Process) ProtoReflect() protoreflect.Message
- func (x *Process) Reset()
- func (x *Process) String() string
- type SendCommandsRequest
- func (*SendCommandsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendCommandsRequest) GetAuth() *Auth
- func (x *SendCommandsRequest) GetCommands() []*Command
- func (*SendCommandsRequest) ProtoMessage()
- func (x *SendCommandsRequest) ProtoReflect() protoreflect.Message
- func (x *SendCommandsRequest) Reset()
- func (x *SendCommandsRequest) String() string
- type SendProcessesRequest
- func (*SendProcessesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendProcessesRequest) GetAuth() *Auth
- func (x *SendProcessesRequest) GetProcesses() []*Process
- func (*SendProcessesRequest) ProtoMessage()
- func (x *SendProcessesRequest) ProtoReflect() protoreflect.Message
- func (x *SendProcessesRequest) Reset()
- func (x *SendProcessesRequest) String() string
- type UnimplementedCollectorServiceServer
- type UnsafeCollectorServiceServer
Constants ¶
const ( CollectorService_SendCommands_FullMethodName = "/api.v1.CollectorService/SendCommands" CollectorService_SendProcesses_FullMethodName = "/api.v1.CollectorService/SendProcesses" )
Variables ¶
var CollectorService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.v1.CollectorService", HandlerType: (*CollectorServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendCommands", Handler: _CollectorService_SendCommands_Handler, }, { MethodName: "SendProcesses", Handler: _CollectorService_SendProcesses_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/collector.proto", }
CollectorService_ServiceDesc is the grpc.ServiceDesc for CollectorService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_v1_collector_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCollectorServiceServer ¶
func RegisterCollectorServiceServer(s grpc.ServiceRegistrar, srv CollectorServiceServer)
Types ¶
type Auth ¶
type Auth struct { UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // Unique identifer for user that is processing the data TeamId string `protobuf:"bytes,2,opt,name=team_id,json=teamId,proto3" json:"team_id,omitempty"` // Unique identifier for users team WorkspaceId *string `protobuf:"bytes,3,opt,name=workspace_id,json=workspaceId,proto3,oneof" json:"workspace_id,omitempty"` // Unique identifier of the Workspace that is running the request UserEmail string `protobuf:"bytes,4,opt,name=user_email,json=userEmail,proto3" json:"user_email,omitempty"` // Unique identifier of user that is processing the data // contains filtered or unexported fields }
Define a message representing an auth information about user and team.
func (*Auth) Descriptor
deprecated
func (*Auth) GetUserEmail ¶
func (*Auth) GetWorkspaceId ¶
func (*Auth) ProtoMessage ¶
func (*Auth) ProtoMessage()
func (*Auth) ProtoReflect ¶
func (x *Auth) ProtoReflect() protoreflect.Message
type CollectorServiceClient ¶
type CollectorServiceClient interface { // RPC method for sending command data. SendCommands(ctx context.Context, in *SendCommandsRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // RPC method for sending process data. SendProcesses(ctx context.Context, in *SendProcessesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
CollectorServiceClient is the client API for CollectorService 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 NewCollectorServiceClient ¶
func NewCollectorServiceClient(cc grpc.ClientConnInterface) CollectorServiceClient
type CollectorServiceServer ¶
type CollectorServiceServer interface { // RPC method for sending command data. SendCommands(context.Context, *SendCommandsRequest) (*emptypb.Empty, error) // RPC method for sending process data. SendProcesses(context.Context, *SendProcessesRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
CollectorServiceServer is the server API for CollectorService service. All implementations must embed UnimplementedCollectorServiceServer for forward compatibility
type Command ¶
type Command struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Unique identifier for the command. Category string `protobuf:"bytes,2,opt,name=category,proto3" json:"category,omitempty"` // Category of the command (e.g., system, user). Command string `protobuf:"bytes,3,opt,name=command,proto3" json:"command,omitempty"` // The actual command string. User string `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"` // The user who executed the command. Directory string `protobuf:"bytes,5,opt,name=directory,proto3" json:"directory,omitempty"` // The directory from which the command was executed. ExecutionTime int64 `protobuf:"varint,6,opt,name=execution_time,json=executionTime,proto3" json:"execution_time,omitempty"` // Execution time of the command in milliseconds. StartTime int64 `protobuf:"varint,7,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // Start time of the command execution (Unix timestamp). EndTime int64 `protobuf:"varint,8,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // End time of the command execution (Unix timestamp). Result string `protobuf:"bytes,9,opt,name=result,proto3" json:"result,omitempty"` // Result of executed command => success/failure Status string `protobuf:"bytes,10,opt,name=status,proto3" json:"status,omitempty"` // Status of executed command Repository string `protobuf:"bytes,11,opt,name=repository,proto3" json:"repository,omitempty"` // Repository is repository where commands are executed Pid int64 `protobuf:"varint,12,opt,name=pid,proto3" json:"pid,omitempty"` // PID of the command // contains filtered or unexported fields }
Define a message representing a command, including its metadata and timing information.
func (*Command) Descriptor
deprecated
func (*Command) GetCategory ¶
func (*Command) GetCommand ¶
func (*Command) GetDirectory ¶
func (*Command) GetEndTime ¶
func (*Command) GetExecutionTime ¶
func (*Command) GetRepository ¶
func (*Command) GetStartTime ¶
func (*Command) ProtoMessage ¶
func (*Command) ProtoMessage()
func (*Command) ProtoReflect ¶
func (x *Command) ProtoReflect() protoreflect.Message
type Process ¶
type Process struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Unique identifier for the process. Pid int64 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"` // Process ID. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // Process name. Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` // Current status of the process (e.g., running, sleeping). CreatedTime int64 `protobuf:"varint,5,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"` // Creation time of the process (Unix timestamp). StoredTime int64 `protobuf:"varint,6,opt,name=stored_time,json=storedTime,proto3" json:"stored_time,omitempty"` // Time at which the process information was stored (Unix timestamp). Os string `protobuf:"bytes,7,opt,name=os,proto3" json:"os,omitempty"` // Operating system the process is running on. Platform string `protobuf:"bytes,8,opt,name=platform,proto3" json:"platform,omitempty"` // Platform information (e.g., Linux, Windows). PlatformFamily string `protobuf:"bytes,9,opt,name=platform_family,json=platformFamily,proto3" json:"platform_family,omitempty"` // More detailed platform family information. CpuUsage float64 `protobuf:"fixed64,10,opt,name=cpu_usage,json=cpuUsage,proto3" json:"cpu_usage,omitempty"` // CPU usage percentage by the process. MemoryUsage float64 `protobuf:"fixed64,11,opt,name=memory_usage,json=memoryUsage,proto3" json:"memory_usage,omitempty"` // Memory usage by the process in megabytes. Ppid int64 `protobuf:"varint,12,opt,name=ppid,proto3" json:"ppid,omitempty"` // Parent process ID. // contains filtered or unexported fields }
Define a message representing a process, including its metadata and resource usage.
func (*Process) Descriptor
deprecated
func (*Process) GetCpuUsage ¶
func (*Process) GetCreatedTime ¶
func (*Process) GetMemoryUsage ¶
func (*Process) GetPlatform ¶
func (*Process) GetPlatformFamily ¶
func (*Process) GetStoredTime ¶
func (*Process) ProtoMessage ¶
func (*Process) ProtoMessage()
func (*Process) ProtoReflect ¶
func (x *Process) ProtoReflect() protoreflect.Message
type SendCommandsRequest ¶
type SendCommandsRequest struct { Commands []*Command `protobuf:"bytes,1,rep,name=commands,proto3" json:"commands,omitempty"` // A list of commands. Auth *Auth `protobuf:"bytes,2,opt,name=auth,proto3,oneof" json:"auth,omitempty"` // Optional auth configuration // contains filtered or unexported fields }
Defines a request for sending a collection of commands.
func (*SendCommandsRequest) Descriptor
deprecated
func (*SendCommandsRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendCommandsRequest.ProtoReflect.Descriptor instead.
func (*SendCommandsRequest) GetAuth ¶
func (x *SendCommandsRequest) GetAuth() *Auth
func (*SendCommandsRequest) GetCommands ¶
func (x *SendCommandsRequest) GetCommands() []*Command
func (*SendCommandsRequest) ProtoMessage ¶
func (*SendCommandsRequest) ProtoMessage()
func (*SendCommandsRequest) ProtoReflect ¶
func (x *SendCommandsRequest) ProtoReflect() protoreflect.Message
func (*SendCommandsRequest) Reset ¶
func (x *SendCommandsRequest) Reset()
func (*SendCommandsRequest) String ¶
func (x *SendCommandsRequest) String() string
type SendProcessesRequest ¶
type SendProcessesRequest struct { Processes []*Process `protobuf:"bytes,1,rep,name=processes,proto3" json:"processes,omitempty"` // A list of processes. Auth *Auth `protobuf:"bytes,2,opt,name=auth,proto3,oneof" json:"auth,omitempty"` // Optional auth configuration // contains filtered or unexported fields }
Defines a request for sending a collection of processes.
func (*SendProcessesRequest) Descriptor
deprecated
func (*SendProcessesRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendProcessesRequest.ProtoReflect.Descriptor instead.
func (*SendProcessesRequest) GetAuth ¶
func (x *SendProcessesRequest) GetAuth() *Auth
func (*SendProcessesRequest) GetProcesses ¶
func (x *SendProcessesRequest) GetProcesses() []*Process
func (*SendProcessesRequest) ProtoMessage ¶
func (*SendProcessesRequest) ProtoMessage()
func (*SendProcessesRequest) ProtoReflect ¶
func (x *SendProcessesRequest) ProtoReflect() protoreflect.Message
func (*SendProcessesRequest) Reset ¶
func (x *SendProcessesRequest) Reset()
func (*SendProcessesRequest) String ¶
func (x *SendProcessesRequest) String() string
type UnimplementedCollectorServiceServer ¶
type UnimplementedCollectorServiceServer struct { }
UnimplementedCollectorServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCollectorServiceServer) SendCommands ¶
func (UnimplementedCollectorServiceServer) SendCommands(context.Context, *SendCommandsRequest) (*emptypb.Empty, error)
func (UnimplementedCollectorServiceServer) SendProcesses ¶
func (UnimplementedCollectorServiceServer) SendProcesses(context.Context, *SendProcessesRequest) (*emptypb.Empty, error)
type UnsafeCollectorServiceServer ¶
type UnsafeCollectorServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCollectorServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CollectorServiceServer will result in compilation errors.