Documentation
¶
Index ¶
- Constants
- Variables
- func DeleteAgent(cnf *config.Config) error
- func EnqueueLog(newLog *plugins.Log) error
- func GetAgentManagerConnection(cnf *config.Config) (*grpc.ClientConn, error)
- func GetCorrelationConnection(cnf *config.Config) (*grpc.ClientConn, error)
- func GetDataRetention() (int, error)
- func HandleGRPCStreamError(err error, msg string, errorLogged *bool)
- func IncidentResponseStream(cnf *config.Config, ctx context.Context)
- func LogConnectionError(err error, target string, errorLogged *bool)
- func LogStreamError(err error, streamName string, errorLogged *bool)
- func RecordSourceEvent(source string, err error)
- func RegisterAgent(cnf *config.Config, UTMKey string) error
- func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer)
- func RegisterPanelServiceServer(s grpc.ServiceRegistrar, srv PanelServiceServer)
- func RegisterPingServiceServer(s grpc.ServiceRegistrar, srv PingServiceServer)
- func RunStatusReporter(ctx context.Context)
- func SetDataRetention(retention string) error
- func SetUpdateHold(content string) error
- func StartPing(cnf *config.Config, ctx context.Context)
- func UninstallAll() error
- func UpdateAgent(cnf *config.Config, ctx context.Context)
- type Agent
- func (*Agent) Descriptor() ([]byte, []int)deprecated
- func (x *Agent) GetAddresses() string
- func (x *Agent) GetAgentKey() string
- func (x *Agent) GetAliases() string
- func (x *Agent) GetHostname() string
- func (x *Agent) GetId() uint32
- func (x *Agent) GetIp() string
- func (x *Agent) GetLastSeen() string
- func (x *Agent) GetMac() string
- func (x *Agent) GetNoRemoteControl() bool
- func (x *Agent) GetOs() string
- func (x *Agent) GetOsMajorVersion() string
- func (x *Agent) GetOsMinorVersion() string
- func (x *Agent) GetPlatform() string
- func (x *Agent) GetStatus() Status
- func (x *Agent) GetTenantId() string
- func (x *Agent) GetVersion() string
- func (*Agent) ProtoMessage()
- func (x *Agent) ProtoReflect() protoreflect.Message
- func (x *Agent) Reset()
- func (x *Agent) String() string
- type AgentCommand
- func (*AgentCommand) Descriptor() ([]byte, []int)deprecated
- func (x *AgentCommand) GetAgentId() uint32
- func (x *AgentCommand) GetCmdId() string
- func (x *AgentCommand) GetCommand() string
- func (x *AgentCommand) GetCommandStatus() AgentCommandStatus
- func (x *AgentCommand) GetCreatedAt() *timestamppb.Timestamp
- func (x *AgentCommand) GetExecutedBy() string
- func (x *AgentCommand) GetOriginId() string
- func (x *AgentCommand) GetOriginType() string
- func (x *AgentCommand) GetReason() string
- func (x *AgentCommand) GetResult() string
- func (x *AgentCommand) GetUpdatedAt() *timestamppb.Timestamp
- func (*AgentCommand) ProtoMessage()
- func (x *AgentCommand) ProtoReflect() protoreflect.Message
- func (x *AgentCommand) Reset()
- func (x *AgentCommand) String() string
- type AgentCommandStatus
- func (AgentCommandStatus) Descriptor() protoreflect.EnumDescriptor
- func (x AgentCommandStatus) Enum() *AgentCommandStatus
- func (AgentCommandStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x AgentCommandStatus) Number() protoreflect.EnumNumber
- func (x AgentCommandStatus) String() string
- func (AgentCommandStatus) Type() protoreflect.EnumType
- type AgentRequest
- func (*AgentRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AgentRequest) GetAddresses() string
- func (x *AgentRequest) GetAliases() string
- func (x *AgentRequest) GetHostname() string
- func (x *AgentRequest) GetIp() string
- func (x *AgentRequest) GetMac() string
- func (x *AgentRequest) GetNoRemoteControl() bool
- func (x *AgentRequest) GetOs() string
- func (x *AgentRequest) GetOsMajorVersion() string
- func (x *AgentRequest) GetOsMinorVersion() string
- func (x *AgentRequest) GetPlatform() string
- func (x *AgentRequest) GetRegisterBy() string
- func (x *AgentRequest) GetVersion() string
- func (*AgentRequest) ProtoMessage()
- func (x *AgentRequest) ProtoReflect() protoreflect.Message
- func (x *AgentRequest) Reset()
- func (x *AgentRequest) String() string
- type AgentServiceClient
- type AgentServiceServer
- type AgentService_AgentStreamClient
- type AgentService_AgentStreamServer
- type AuthResponse
- func (*AuthResponse) Descriptor() ([]byte, []int)deprecated
- func (x *AuthResponse) GetId() uint32
- func (x *AuthResponse) GetKey() string
- func (*AuthResponse) ProtoMessage()
- func (x *AuthResponse) ProtoReflect() protoreflect.Message
- func (x *AuthResponse) Reset()
- func (x *AuthResponse) String() string
- type BidirectionalStream
- func (*BidirectionalStream) Descriptor() ([]byte, []int)deprecated
- func (x *BidirectionalStream) GetCommand() *UtmCommand
- func (x *BidirectionalStream) GetConfigState() *ConfigState
- func (x *BidirectionalStream) GetConfigUpdate() *ConfigUpdate
- func (x *BidirectionalStream) GetHeartbeat() *Heartbeat
- func (x *BidirectionalStream) GetResult() *CommandResult
- func (x *BidirectionalStream) GetStreamMessage() isBidirectionalStream_StreamMessage
- func (*BidirectionalStream) ProtoMessage()
- func (x *BidirectionalStream) ProtoReflect() protoreflect.Message
- func (x *BidirectionalStream) Reset()
- func (x *BidirectionalStream) String() string
- type BidirectionalStream_Command
- type BidirectionalStream_ConfigState
- type BidirectionalStream_ConfigUpdate
- type BidirectionalStream_Heartbeat
- type BidirectionalStream_Result
- type CommandResult
- func (*CommandResult) Descriptor() ([]byte, []int)deprecated
- func (x *CommandResult) GetAgentId() string
- func (x *CommandResult) GetCmdId() string
- func (x *CommandResult) GetExecutedAt() *timestamppb.Timestamp
- func (x *CommandResult) GetExitCode() int32
- func (x *CommandResult) GetResult() string
- func (*CommandResult) ProtoMessage()
- func (x *CommandResult) ProtoReflect() protoreflect.Message
- func (x *CommandResult) Reset()
- func (x *CommandResult) String() string
- type ConfigState
- type ConfigUpdate
- func (*ConfigUpdate) Descriptor() ([]byte, []int)deprecated
- func (x *ConfigUpdate) GetContent() string
- func (x *ConfigUpdate) GetKey() string
- func (x *ConfigUpdate) GetRevision() uint64
- func (*ConfigUpdate) ProtoMessage()
- func (x *ConfigUpdate) ProtoReflect() protoreflect.Message
- func (x *ConfigUpdate) Reset()
- func (x *ConfigUpdate) String() string
- type ConnectionKeyRequest
- func (*ConnectionKeyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ConnectionKeyRequest) GetTenantId() string
- func (*ConnectionKeyRequest) ProtoMessage()
- func (x *ConnectionKeyRequest) ProtoReflect() protoreflect.Message
- func (x *ConnectionKeyRequest) Reset()
- func (x *ConnectionKeyRequest) String() string
- type ConnectionKeyResponse
- func (*ConnectionKeyResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ConnectionKeyResponse) GetConnectionKey() string
- func (*ConnectionKeyResponse) ProtoMessage()
- func (x *ConnectionKeyResponse) ProtoReflect() protoreflect.Message
- func (x *ConnectionKeyResponse) Reset()
- func (x *ConnectionKeyResponse) String() string
- type ConnectorAuthRequest
- func (*ConnectorAuthRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ConnectorAuthRequest) GetId() uint32
- func (*ConnectorAuthRequest) ProtoMessage()
- func (x *ConnectorAuthRequest) ProtoReflect() protoreflect.Message
- func (x *ConnectorAuthRequest) Reset()
- func (x *ConnectorAuthRequest) String() string
- type ConnectorAuthResponse
- func (*ConnectorAuthResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ConnectorAuthResponse) GetKey() string
- func (x *ConnectorAuthResponse) GetTenantId() string
- func (*ConnectorAuthResponse) ProtoMessage()
- func (x *ConnectorAuthResponse) ProtoReflect() protoreflect.Message
- func (x *ConnectorAuthResponse) Reset()
- func (x *ConnectorAuthResponse) String() string
- type ConnectorType
- func (ConnectorType) Descriptor() protoreflect.EnumDescriptor
- func (x ConnectorType) Enum() *ConnectorType
- func (ConnectorType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ConnectorType) Number() protoreflect.EnumNumber
- func (x ConnectorType) String() string
- func (ConnectorType) Type() protoreflect.EnumType
- type DeleteRequest
- type Heartbeat
- type ListAgentsCommandsResponse
- func (*ListAgentsCommandsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListAgentsCommandsResponse) GetRows() []*AgentCommand
- func (x *ListAgentsCommandsResponse) GetTotal() int32
- func (*ListAgentsCommandsResponse) ProtoMessage()
- func (x *ListAgentsCommandsResponse) ProtoReflect() protoreflect.Message
- func (x *ListAgentsCommandsResponse) Reset()
- func (x *ListAgentsCommandsResponse) String() string
- type ListAgentsResponse
- func (*ListAgentsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListAgentsResponse) GetRows() []*Agent
- func (x *ListAgentsResponse) GetTotal() int32
- func (*ListAgentsResponse) ProtoMessage()
- func (x *ListAgentsResponse) ProtoReflect() protoreflect.Message
- func (x *ListAgentsResponse) Reset()
- func (x *ListAgentsResponse) String() string
- type ListRequest
- func (*ListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListRequest) GetPageNumber() int32
- func (x *ListRequest) GetPageSize() int32
- func (x *ListRequest) GetSearchQuery() string
- func (x *ListRequest) GetSortBy() string
- func (x *ListRequest) GetTenantId() string
- func (*ListRequest) ProtoMessage()
- func (x *ListRequest) ProtoReflect() protoreflect.Message
- func (x *ListRequest) Reset()
- func (x *ListRequest) String() string
- type LogProcessor
- type PanelServiceClient
- type PanelServiceServer
- type PanelService_ProcessCommandClient
- type PanelService_ProcessCommandServer
- type PingRequest
- type PingResponse
- type PingServiceClient
- type PingServiceServer
- type PingService_PingClient
- type PingService_PingServer
- type SetAgentConfigRequest
- func (*SetAgentConfigRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetAgentConfigRequest) GetAgentId() uint32
- func (x *SetAgentConfigRequest) GetContent() string
- func (x *SetAgentConfigRequest) GetKey() string
- func (*SetAgentConfigRequest) ProtoMessage()
- func (x *SetAgentConfigRequest) ProtoReflect() protoreflect.Message
- func (x *SetAgentConfigRequest) Reset()
- func (x *SetAgentConfigRequest) String() string
- type SetAgentConfigResponse
- func (*SetAgentConfigResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SetAgentConfigResponse) GetRevision() uint64
- func (*SetAgentConfigResponse) ProtoMessage()
- func (x *SetAgentConfigResponse) ProtoReflect() protoreflect.Message
- func (x *SetAgentConfigResponse) Reset()
- func (x *SetAgentConfigResponse) String() string
- type SourceStats
- type Status
- type StatusSnapshot
- type UnimplementedAgentServiceServer
- func (UnimplementedAgentServiceServer) AgentStream(grpc.BidiStreamingServer[BidirectionalStream, BidirectionalStream]) error
- func (UnimplementedAgentServiceServer) DeleteAgent(context.Context, *DeleteRequest) (*AuthResponse, error)
- func (UnimplementedAgentServiceServer) GetAgentAuth(context.Context, *ConnectorAuthRequest) (*ConnectorAuthResponse, error)
- func (UnimplementedAgentServiceServer) ListAgentCommands(context.Context, *ListRequest) (*ListAgentsCommandsResponse, error)
- func (UnimplementedAgentServiceServer) ListAgents(context.Context, *ListRequest) (*ListAgentsResponse, error)
- func (UnimplementedAgentServiceServer) RegisterAgent(context.Context, *AgentRequest) (*AuthResponse, error)
- func (UnimplementedAgentServiceServer) UpdateAgent(context.Context, *AgentRequest) (*AuthResponse, error)
- type UnimplementedPanelServiceServer
- func (UnimplementedPanelServiceServer) GetConnectionKey(context.Context, *ConnectionKeyRequest) (*ConnectionKeyResponse, error)
- func (UnimplementedPanelServiceServer) ProcessCommand(grpc.BidiStreamingServer[UtmCommand, CommandResult]) error
- func (UnimplementedPanelServiceServer) RotateConnectionKey(context.Context, *ConnectionKeyRequest) (*ConnectionKeyResponse, error)
- func (UnimplementedPanelServiceServer) SetAgentConfig(context.Context, *SetAgentConfigRequest) (*SetAgentConfigResponse, error)
- type UnimplementedPingServiceServer
- type UnsafeAgentServiceServer
- type UnsafePanelServiceServer
- type UnsafePingServiceServer
- type UtmCommand
- func (*UtmCommand) Descriptor() ([]byte, []int)deprecated
- func (x *UtmCommand) GetAgentId() string
- func (x *UtmCommand) GetCmdId() string
- func (x *UtmCommand) GetCommand() string
- func (x *UtmCommand) GetExecutedBy() string
- func (x *UtmCommand) GetOriginId() string
- func (x *UtmCommand) GetOriginType() string
- func (x *UtmCommand) GetReason() string
- func (x *UtmCommand) GetShell() string
- func (*UtmCommand) ProtoMessage()
- func (x *UtmCommand) ProtoReflect() protoreflect.Message
- func (x *UtmCommand) Reset()
- func (x *UtmCommand) String() string
Constants ¶
const ( AgentService_RegisterAgent_FullMethodName = "/agent.AgentService/RegisterAgent" AgentService_UpdateAgent_FullMethodName = "/agent.AgentService/UpdateAgent" AgentService_DeleteAgent_FullMethodName = "/agent.AgentService/DeleteAgent" AgentService_ListAgents_FullMethodName = "/agent.AgentService/ListAgents" AgentService_GetAgentAuth_FullMethodName = "/agent.AgentService/GetAgentAuth" AgentService_AgentStream_FullMethodName = "/agent.AgentService/AgentStream" AgentService_ListAgentCommands_FullMethodName = "/agent.AgentService/ListAgentCommands" )
const ( PanelService_ProcessCommand_FullMethodName = "/agent.PanelService/ProcessCommand" PanelService_GetConnectionKey_FullMethodName = "/agent.PanelService/GetConnectionKey" PanelService_RotateConnectionKey_FullMethodName = "/agent.PanelService/RotateConnectionKey" PanelService_SetAgentConfig_FullMethodName = "/agent.PanelService/SetAgentConfig" )
const (
PingService_Ping_FullMethodName = "/agent.PingService/Ping"
)
Variables ¶
var ( AgentCommandStatus_name = map[int32]string{ 0: "NOT_EXECUTED", 1: "QUEUE", 2: "PENDING", 3: "EXECUTED", 4: "ERROR", } AgentCommandStatus_value = map[string]int32{ "NOT_EXECUTED": 0, "QUEUE": 1, "PENDING": 2, "EXECUTED": 3, "ERROR": 4, } )
Enum value maps for AgentCommandStatus.
var ( Status_name = map[int32]string{ 0: "ONLINE", 1: "OFFLINE", 2: "UNKNOWN", } Status_value = map[string]int32{ "ONLINE": 0, "OFFLINE": 1, "UNKNOWN": 2, } )
Enum value maps for Status.
var ( ConnectorType_name = map[int32]string{ 0: "AGENT", 1: "COLLECTOR", } ConnectorType_value = map[string]int32{ "AGENT": 0, "COLLECTOR": 1, } )
Enum value maps for ConnectorType.
var ( LogQueue = make(chan *plugins.Log, 10000) // ErrAgentUninstalled is returned when the agent uninstalls itself due to invalid key ErrAgentUninstalled = errors.New("agent uninstalled due to invalid key") )
var AgentService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "agent.AgentService", HandlerType: (*AgentServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "RegisterAgent", Handler: _AgentService_RegisterAgent_Handler, }, { MethodName: "UpdateAgent", Handler: _AgentService_UpdateAgent_Handler, }, { MethodName: "DeleteAgent", Handler: _AgentService_DeleteAgent_Handler, }, { MethodName: "ListAgents", Handler: _AgentService_ListAgents_Handler, }, { MethodName: "GetAgentAuth", Handler: _AgentService_GetAgentAuth_Handler, }, { MethodName: "ListAgentCommands", Handler: _AgentService_ListAgentCommands_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "AgentStream", Handler: _AgentService_AgentStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "agent.proto", }
AgentService_ServiceDesc is the grpc.ServiceDesc for AgentService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_agent_proto protoreflect.FileDescriptor
var File_common_proto protoreflect.FileDescriptor
var File_ping_proto protoreflect.FileDescriptor
var PanelService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "agent.PanelService", HandlerType: (*PanelServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetConnectionKey", Handler: _PanelService_GetConnectionKey_Handler, }, { MethodName: "RotateConnectionKey", Handler: _PanelService_RotateConnectionKey_Handler, }, { MethodName: "SetAgentConfig", Handler: _PanelService_SetAgentConfig_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ProcessCommand", Handler: _PanelService_ProcessCommand_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "agent.proto", }
PanelService_ServiceDesc is the grpc.ServiceDesc for PanelService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var PingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "agent.PingService", HandlerType: (*PingServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Ping", Handler: _PingService_Ping_Handler, ClientStreams: true, }, }, Metadata: "ping.proto", }
PingService_ServiceDesc is the grpc.ServiceDesc for PingService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func DeleteAgent ¶
func EnqueueLog ¶
func GetAgentManagerConnection ¶
func GetAgentManagerConnection(cnf *config.Config) (*grpc.ClientConn, error)
func GetCorrelationConnection ¶
func GetCorrelationConnection(cnf *config.Config) (*grpc.ClientConn, error)
func GetDataRetention ¶
func HandleGRPCStreamError ¶
func LogConnectionError ¶
LogConnectionError logs a connection error with deduplication.
func LogStreamError ¶
LogStreamError logs a stream creation error with deduplication.
func RecordSourceEvent ¶
func RegisterAgentServiceServer ¶
func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer)
func RegisterPanelServiceServer ¶
func RegisterPanelServiceServer(s grpc.ServiceRegistrar, srv PanelServiceServer)
func RegisterPingServiceServer ¶
func RegisterPingServiceServer(s grpc.ServiceRegistrar, srv PingServiceServer)
func RunStatusReporter ¶
func SetDataRetention ¶
func SetUpdateHold ¶
func UninstallAll ¶
func UninstallAll() error
Types ¶
type Agent ¶
type Agent struct {
Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"`
Os string `protobuf:"bytes,3,opt,name=os,proto3" json:"os,omitempty"`
Status Status `protobuf:"varint,4,opt,name=status,proto3,enum=agent.Status" json:"status,omitempty"`
Platform string `protobuf:"bytes,5,opt,name=platform,proto3" json:"platform,omitempty"`
Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`
AgentKey string `protobuf:"bytes,7,opt,name=agent_key,json=agentKey,proto3" json:"agent_key,omitempty"`
Id uint32 `protobuf:"varint,8,opt,name=id,proto3" json:"id,omitempty"`
LastSeen string `protobuf:"bytes,9,opt,name=last_seen,json=lastSeen,proto3" json:"last_seen,omitempty"`
Mac string `protobuf:"bytes,10,opt,name=mac,proto3" json:"mac,omitempty"`
OsMajorVersion string `protobuf:"bytes,11,opt,name=os_major_version,json=osMajorVersion,proto3" json:"os_major_version,omitempty"`
OsMinorVersion string `protobuf:"bytes,12,opt,name=os_minor_version,json=osMinorVersion,proto3" json:"os_minor_version,omitempty"`
Aliases string `protobuf:"bytes,13,opt,name=aliases,proto3" json:"aliases,omitempty"`
Addresses string `protobuf:"bytes,14,opt,name=addresses,proto3" json:"addresses,omitempty"`
TenantId string `protobuf:"bytes,15,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
NoRemoteControl bool `protobuf:"varint,16,opt,name=no_remote_control,json=noRemoteControl,proto3" json:"no_remote_control,omitempty"`
// contains filtered or unexported fields
}
func (*Agent) Descriptor
deprecated
func (*Agent) GetAddresses ¶
func (*Agent) GetAgentKey ¶
func (*Agent) GetAliases ¶
func (*Agent) GetHostname ¶
func (*Agent) GetLastSeen ¶
func (*Agent) GetNoRemoteControl ¶
func (*Agent) GetOsMajorVersion ¶
func (*Agent) GetOsMinorVersion ¶
func (*Agent) GetPlatform ¶
func (*Agent) GetTenantId ¶
func (*Agent) GetVersion ¶
func (*Agent) ProtoMessage ¶
func (*Agent) ProtoMessage()
func (*Agent) ProtoReflect ¶
func (x *Agent) ProtoReflect() protoreflect.Message
type AgentCommand ¶
type AgentCommand struct {
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
AgentId uint32 `protobuf:"varint,3,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
Command string `protobuf:"bytes,4,opt,name=command,proto3" json:"command,omitempty"`
CommandStatus AgentCommandStatus `` /* 131-byte string literal not displayed */
Result string `protobuf:"bytes,6,opt,name=result,proto3" json:"result,omitempty"`
ExecutedBy string `protobuf:"bytes,7,opt,name=executed_by,json=executedBy,proto3" json:"executed_by,omitempty"`
CmdId string `protobuf:"bytes,8,opt,name=cmd_id,json=cmdId,proto3" json:"cmd_id,omitempty"`
Reason string `protobuf:"bytes,9,opt,name=reason,proto3" json:"reason,omitempty"`
OriginType string `protobuf:"bytes,10,opt,name=origin_type,json=originType,proto3" json:"origin_type,omitempty"`
OriginId string `protobuf:"bytes,11,opt,name=origin_id,json=originId,proto3" json:"origin_id,omitempty"`
// contains filtered or unexported fields
}
func (*AgentCommand) Descriptor
deprecated
func (*AgentCommand) Descriptor() ([]byte, []int)
Deprecated: Use AgentCommand.ProtoReflect.Descriptor instead.
func (*AgentCommand) GetAgentId ¶
func (x *AgentCommand) GetAgentId() uint32
func (*AgentCommand) GetCmdId ¶
func (x *AgentCommand) GetCmdId() string
func (*AgentCommand) GetCommand ¶
func (x *AgentCommand) GetCommand() string
func (*AgentCommand) GetCommandStatus ¶
func (x *AgentCommand) GetCommandStatus() AgentCommandStatus
func (*AgentCommand) GetCreatedAt ¶
func (x *AgentCommand) GetCreatedAt() *timestamppb.Timestamp
func (*AgentCommand) GetExecutedBy ¶
func (x *AgentCommand) GetExecutedBy() string
func (*AgentCommand) GetOriginId ¶
func (x *AgentCommand) GetOriginId() string
func (*AgentCommand) GetOriginType ¶
func (x *AgentCommand) GetOriginType() string
func (*AgentCommand) GetReason ¶
func (x *AgentCommand) GetReason() string
func (*AgentCommand) GetResult ¶
func (x *AgentCommand) GetResult() string
func (*AgentCommand) GetUpdatedAt ¶
func (x *AgentCommand) GetUpdatedAt() *timestamppb.Timestamp
func (*AgentCommand) ProtoMessage ¶
func (*AgentCommand) ProtoMessage()
func (*AgentCommand) ProtoReflect ¶
func (x *AgentCommand) ProtoReflect() protoreflect.Message
func (*AgentCommand) Reset ¶
func (x *AgentCommand) Reset()
func (*AgentCommand) String ¶
func (x *AgentCommand) String() string
type AgentCommandStatus ¶
type AgentCommandStatus int32
const ( AgentCommandStatus_NOT_EXECUTED AgentCommandStatus = 0 AgentCommandStatus_QUEUE AgentCommandStatus = 1 AgentCommandStatus_PENDING AgentCommandStatus = 2 AgentCommandStatus_EXECUTED AgentCommandStatus = 3 AgentCommandStatus_ERROR AgentCommandStatus = 4 )
func (AgentCommandStatus) Descriptor ¶
func (AgentCommandStatus) Descriptor() protoreflect.EnumDescriptor
func (AgentCommandStatus) Enum ¶
func (x AgentCommandStatus) Enum() *AgentCommandStatus
func (AgentCommandStatus) EnumDescriptor
deprecated
func (AgentCommandStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use AgentCommandStatus.Descriptor instead.
func (AgentCommandStatus) Number ¶
func (x AgentCommandStatus) Number() protoreflect.EnumNumber
func (AgentCommandStatus) String ¶
func (x AgentCommandStatus) String() string
func (AgentCommandStatus) Type ¶
func (AgentCommandStatus) Type() protoreflect.EnumType
type AgentRequest ¶
type AgentRequest struct {
Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"`
Os string `protobuf:"bytes,3,opt,name=os,proto3" json:"os,omitempty"`
Platform string `protobuf:"bytes,4,opt,name=platform,proto3" json:"platform,omitempty"`
Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
RegisterBy string `protobuf:"bytes,6,opt,name=register_by,json=registerBy,proto3" json:"register_by,omitempty"`
Mac string `protobuf:"bytes,7,opt,name=mac,proto3" json:"mac,omitempty"`
OsMajorVersion string `protobuf:"bytes,8,opt,name=os_major_version,json=osMajorVersion,proto3" json:"os_major_version,omitempty"`
OsMinorVersion string `protobuf:"bytes,9,opt,name=os_minor_version,json=osMinorVersion,proto3" json:"os_minor_version,omitempty"`
Aliases string `protobuf:"bytes,10,opt,name=aliases,proto3" json:"aliases,omitempty"`
Addresses string `protobuf:"bytes,11,opt,name=addresses,proto3" json:"addresses,omitempty"`
// Set at install and never changed from here. It is reported so the console
// can show that this machine refuses commands; the refusal itself happens in
// the agent, because a flag the server honours is worth nothing against a
// server that has been taken over.
NoRemoteControl bool `protobuf:"varint,12,opt,name=no_remote_control,json=noRemoteControl,proto3" json:"no_remote_control,omitempty"`
// contains filtered or unexported fields
}
func (*AgentRequest) Descriptor
deprecated
func (*AgentRequest) Descriptor() ([]byte, []int)
Deprecated: Use AgentRequest.ProtoReflect.Descriptor instead.
func (*AgentRequest) GetAddresses ¶
func (x *AgentRequest) GetAddresses() string
func (*AgentRequest) GetAliases ¶
func (x *AgentRequest) GetAliases() string
func (*AgentRequest) GetHostname ¶
func (x *AgentRequest) GetHostname() string
func (*AgentRequest) GetIp ¶
func (x *AgentRequest) GetIp() string
func (*AgentRequest) GetMac ¶
func (x *AgentRequest) GetMac() string
func (*AgentRequest) GetNoRemoteControl ¶
func (x *AgentRequest) GetNoRemoteControl() bool
func (*AgentRequest) GetOs ¶
func (x *AgentRequest) GetOs() string
func (*AgentRequest) GetOsMajorVersion ¶
func (x *AgentRequest) GetOsMajorVersion() string
func (*AgentRequest) GetOsMinorVersion ¶
func (x *AgentRequest) GetOsMinorVersion() string
func (*AgentRequest) GetPlatform ¶
func (x *AgentRequest) GetPlatform() string
func (*AgentRequest) GetRegisterBy ¶
func (x *AgentRequest) GetRegisterBy() string
func (*AgentRequest) GetVersion ¶
func (x *AgentRequest) GetVersion() string
func (*AgentRequest) ProtoMessage ¶
func (*AgentRequest) ProtoMessage()
func (*AgentRequest) ProtoReflect ¶
func (x *AgentRequest) ProtoReflect() protoreflect.Message
func (*AgentRequest) Reset ¶
func (x *AgentRequest) Reset()
func (*AgentRequest) String ¶
func (x *AgentRequest) String() string
type AgentServiceClient ¶
type AgentServiceClient interface {
RegisterAgent(ctx context.Context, in *AgentRequest, opts ...grpc.CallOption) (*AuthResponse, error)
UpdateAgent(ctx context.Context, in *AgentRequest, opts ...grpc.CallOption) (*AuthResponse, error)
DeleteAgent(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*AuthResponse, error)
ListAgents(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListAgentsResponse, error)
GetAgentAuth(ctx context.Context, in *ConnectorAuthRequest, opts ...grpc.CallOption) (*ConnectorAuthResponse, error)
AgentStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[BidirectionalStream, BidirectionalStream], error)
ListAgentCommands(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListAgentsCommandsResponse, error)
}
AgentServiceClient is the client API for AgentService 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 NewAgentServiceClient ¶
func NewAgentServiceClient(cc grpc.ClientConnInterface) AgentServiceClient
type AgentServiceServer ¶
type AgentServiceServer interface {
RegisterAgent(context.Context, *AgentRequest) (*AuthResponse, error)
UpdateAgent(context.Context, *AgentRequest) (*AuthResponse, error)
DeleteAgent(context.Context, *DeleteRequest) (*AuthResponse, error)
ListAgents(context.Context, *ListRequest) (*ListAgentsResponse, error)
GetAgentAuth(context.Context, *ConnectorAuthRequest) (*ConnectorAuthResponse, error)
AgentStream(grpc.BidiStreamingServer[BidirectionalStream, BidirectionalStream]) error
ListAgentCommands(context.Context, *ListRequest) (*ListAgentsCommandsResponse, error)
// contains filtered or unexported methods
}
AgentServiceServer is the server API for AgentService service. All implementations must embed UnimplementedAgentServiceServer for forward compatibility.
type AgentService_AgentStreamClient ¶
type AgentService_AgentStreamClient = grpc.BidiStreamingClient[BidirectionalStream, BidirectionalStream]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type AgentService_AgentStreamServer ¶
type AgentService_AgentStreamServer = grpc.BidiStreamingServer[BidirectionalStream, BidirectionalStream]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type AuthResponse ¶
type AuthResponse struct {
Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
// contains filtered or unexported fields
}
func (*AuthResponse) Descriptor
deprecated
func (*AuthResponse) Descriptor() ([]byte, []int)
Deprecated: Use AuthResponse.ProtoReflect.Descriptor instead.
func (*AuthResponse) GetId ¶
func (x *AuthResponse) GetId() uint32
func (*AuthResponse) GetKey ¶
func (x *AuthResponse) GetKey() string
func (*AuthResponse) ProtoMessage ¶
func (*AuthResponse) ProtoMessage()
func (*AuthResponse) ProtoReflect ¶
func (x *AuthResponse) ProtoReflect() protoreflect.Message
func (*AuthResponse) Reset ¶
func (x *AuthResponse) Reset()
func (*AuthResponse) String ¶
func (x *AuthResponse) String() string
type BidirectionalStream ¶
type BidirectionalStream struct {
// Types that are valid to be assigned to StreamMessage:
//
// *BidirectionalStream_Command
// *BidirectionalStream_Result
// *BidirectionalStream_Heartbeat
// *BidirectionalStream_ConfigState
// *BidirectionalStream_ConfigUpdate
StreamMessage isBidirectionalStream_StreamMessage `protobuf_oneof:"stream_message"`
// contains filtered or unexported fields
}
func (*BidirectionalStream) Descriptor
deprecated
func (*BidirectionalStream) Descriptor() ([]byte, []int)
Deprecated: Use BidirectionalStream.ProtoReflect.Descriptor instead.
func (*BidirectionalStream) GetCommand ¶
func (x *BidirectionalStream) GetCommand() *UtmCommand
func (*BidirectionalStream) GetConfigState ¶
func (x *BidirectionalStream) GetConfigState() *ConfigState
func (*BidirectionalStream) GetConfigUpdate ¶
func (x *BidirectionalStream) GetConfigUpdate() *ConfigUpdate
func (*BidirectionalStream) GetHeartbeat ¶
func (x *BidirectionalStream) GetHeartbeat() *Heartbeat
func (*BidirectionalStream) GetResult ¶
func (x *BidirectionalStream) GetResult() *CommandResult
func (*BidirectionalStream) GetStreamMessage ¶
func (x *BidirectionalStream) GetStreamMessage() isBidirectionalStream_StreamMessage
func (*BidirectionalStream) ProtoMessage ¶
func (*BidirectionalStream) ProtoMessage()
func (*BidirectionalStream) ProtoReflect ¶
func (x *BidirectionalStream) ProtoReflect() protoreflect.Message
func (*BidirectionalStream) Reset ¶
func (x *BidirectionalStream) Reset()
func (*BidirectionalStream) String ¶
func (x *BidirectionalStream) String() string
type BidirectionalStream_Command ¶
type BidirectionalStream_Command struct {
Command *UtmCommand `protobuf:"bytes,1,opt,name=command,proto3,oneof"`
}
type BidirectionalStream_ConfigState ¶
type BidirectionalStream_ConfigState struct {
ConfigState *ConfigState `protobuf:"bytes,4,opt,name=config_state,json=configState,proto3,oneof"`
}
type BidirectionalStream_ConfigUpdate ¶
type BidirectionalStream_ConfigUpdate struct {
ConfigUpdate *ConfigUpdate `protobuf:"bytes,5,opt,name=config_update,json=configUpdate,proto3,oneof"`
}
type BidirectionalStream_Heartbeat ¶
type BidirectionalStream_Heartbeat struct {
Heartbeat *Heartbeat `protobuf:"bytes,3,opt,name=heartbeat,proto3,oneof"`
}
type BidirectionalStream_Result ¶
type BidirectionalStream_Result struct {
Result *CommandResult `protobuf:"bytes,2,opt,name=result,proto3,oneof"`
}
type CommandResult ¶
type CommandResult struct {
AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
Result string `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"`
ExecutedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=executed_at,json=executedAt,proto3" json:"executed_at,omitempty"`
CmdId string `protobuf:"bytes,4,opt,name=cmd_id,json=cmdId,proto3" json:"cmd_id,omitempty"`
// Process exit code, 0 = success. An agent built before this field existed
// never sets it, which decodes as 0 — the same "assume success" behavior
// SOAR already had, so an unpatched agent doesn't regress.
ExitCode int32 `protobuf:"varint,5,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
// contains filtered or unexported fields
}
func (*CommandResult) Descriptor
deprecated
func (*CommandResult) Descriptor() ([]byte, []int)
Deprecated: Use CommandResult.ProtoReflect.Descriptor instead.
func (*CommandResult) GetAgentId ¶
func (x *CommandResult) GetAgentId() string
func (*CommandResult) GetCmdId ¶
func (x *CommandResult) GetCmdId() string
func (*CommandResult) GetExecutedAt ¶
func (x *CommandResult) GetExecutedAt() *timestamppb.Timestamp
func (*CommandResult) GetExitCode ¶
func (x *CommandResult) GetExitCode() int32
func (*CommandResult) GetResult ¶
func (x *CommandResult) GetResult() string
func (*CommandResult) ProtoMessage ¶
func (*CommandResult) ProtoMessage()
func (*CommandResult) ProtoReflect ¶
func (x *CommandResult) ProtoReflect() protoreflect.Message
func (*CommandResult) Reset ¶
func (x *CommandResult) Reset()
func (*CommandResult) String ¶
func (x *CommandResult) String() string
type ConfigState ¶
type ConfigState struct {
Revisions map[string]uint64 `` /* 146-byte string literal not displayed */
// contains filtered or unexported fields
}
ConfigState reports which revision of each named config the agent currently has applied. Sent periodically (not just once) so the server can compute what, if anything, is stale — without keeping its own record of what each agent has. This mirrors Datadog Remote Config's client-declares-state model instead of a per-agent tracking table: the server only needs to know the current authoritative revision of each key, not what any specific agent last received. Called "revision", not "version", to avoid reading as the agent's own software version (see AgentRequest.version) — this counts edits to a config key, unrelated.
func (*ConfigState) Descriptor
deprecated
func (*ConfigState) Descriptor() ([]byte, []int)
Deprecated: Use ConfigState.ProtoReflect.Descriptor instead.
func (*ConfigState) GetRevisions ¶
func (x *ConfigState) GetRevisions() map[string]uint64
func (*ConfigState) ProtoMessage ¶
func (*ConfigState) ProtoMessage()
func (*ConfigState) ProtoReflect ¶
func (x *ConfigState) ProtoReflect() protoreflect.Message
func (*ConfigState) Reset ¶
func (x *ConfigState) Reset()
func (*ConfigState) String ¶
func (x *ConfigState) String() string
type ConfigUpdate ¶
type ConfigUpdate struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Revision uint64 `protobuf:"varint,2,opt,name=revision,proto3" json:"revision,omitempty"`
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
// contains filtered or unexported fields
}
ConfigUpdate pushes one named config's new content. The server sends one of these per key where the agent's reported revision is behind the authoritative one — never proactively, only in response to a ConfigState. The set of valid keys and how to apply each one's content is owned entirely by the agent; the server just stores and revisions opaque content per key.
func (*ConfigUpdate) Descriptor
deprecated
func (*ConfigUpdate) Descriptor() ([]byte, []int)
Deprecated: Use ConfigUpdate.ProtoReflect.Descriptor instead.
func (*ConfigUpdate) GetContent ¶
func (x *ConfigUpdate) GetContent() string
func (*ConfigUpdate) GetKey ¶
func (x *ConfigUpdate) GetKey() string
func (*ConfigUpdate) GetRevision ¶
func (x *ConfigUpdate) GetRevision() uint64
func (*ConfigUpdate) ProtoMessage ¶
func (*ConfigUpdate) ProtoMessage()
func (*ConfigUpdate) ProtoReflect ¶
func (x *ConfigUpdate) ProtoReflect() protoreflect.Message
func (*ConfigUpdate) Reset ¶
func (x *ConfigUpdate) Reset()
func (*ConfigUpdate) String ¶
func (x *ConfigUpdate) String() string
type ConnectionKeyRequest ¶
type ConnectionKeyRequest struct {
// Which tenant's enrolment key. Empty means the default tenant.
TenantId string `protobuf:"bytes,1,opt,name=tenantId,proto3" json:"tenantId,omitempty"`
// contains filtered or unexported fields
}
func (*ConnectionKeyRequest) Descriptor
deprecated
func (*ConnectionKeyRequest) Descriptor() ([]byte, []int)
Deprecated: Use ConnectionKeyRequest.ProtoReflect.Descriptor instead.
func (*ConnectionKeyRequest) GetTenantId ¶
func (x *ConnectionKeyRequest) GetTenantId() string
func (*ConnectionKeyRequest) ProtoMessage ¶
func (*ConnectionKeyRequest) ProtoMessage()
func (*ConnectionKeyRequest) ProtoReflect ¶
func (x *ConnectionKeyRequest) ProtoReflect() protoreflect.Message
func (*ConnectionKeyRequest) Reset ¶
func (x *ConnectionKeyRequest) Reset()
func (*ConnectionKeyRequest) String ¶
func (x *ConnectionKeyRequest) String() string
type ConnectionKeyResponse ¶
type ConnectionKeyResponse struct {
ConnectionKey string `protobuf:"bytes,1,opt,name=connection_key,json=connectionKey,proto3" json:"connection_key,omitempty"`
// contains filtered or unexported fields
}
func (*ConnectionKeyResponse) Descriptor
deprecated
func (*ConnectionKeyResponse) Descriptor() ([]byte, []int)
Deprecated: Use ConnectionKeyResponse.ProtoReflect.Descriptor instead.
func (*ConnectionKeyResponse) GetConnectionKey ¶
func (x *ConnectionKeyResponse) GetConnectionKey() string
func (*ConnectionKeyResponse) ProtoMessage ¶
func (*ConnectionKeyResponse) ProtoMessage()
func (*ConnectionKeyResponse) ProtoReflect ¶
func (x *ConnectionKeyResponse) ProtoReflect() protoreflect.Message
func (*ConnectionKeyResponse) Reset ¶
func (x *ConnectionKeyResponse) Reset()
func (*ConnectionKeyResponse) String ¶
func (x *ConnectionKeyResponse) String() string
type ConnectorAuthRequest ¶
type ConnectorAuthRequest struct {
Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
ConnectorAuthRequest resolves one connector's credential by id.
It exists because listing was the only way to answer that question, and a caller that already holds an id had to pull every connector to find one. It carries what authentication needs and nothing else: no status, no last seen, no hostname — none of which the caller reads, and all of which cost a lookup of their own to assemble.
func (*ConnectorAuthRequest) Descriptor
deprecated
func (*ConnectorAuthRequest) Descriptor() ([]byte, []int)
Deprecated: Use ConnectorAuthRequest.ProtoReflect.Descriptor instead.
func (*ConnectorAuthRequest) GetId ¶
func (x *ConnectorAuthRequest) GetId() uint32
func (*ConnectorAuthRequest) ProtoMessage ¶
func (*ConnectorAuthRequest) ProtoMessage()
func (*ConnectorAuthRequest) ProtoReflect ¶
func (x *ConnectorAuthRequest) ProtoReflect() protoreflect.Message
func (*ConnectorAuthRequest) Reset ¶
func (x *ConnectorAuthRequest) Reset()
func (*ConnectorAuthRequest) String ¶
func (x *ConnectorAuthRequest) String() string
type ConnectorAuthResponse ¶
type ConnectorAuthResponse struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// Empty means the default tenant, the same convention the rest of the
// service uses.
TenantId string `protobuf:"bytes,2,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
// contains filtered or unexported fields
}
func (*ConnectorAuthResponse) Descriptor
deprecated
func (*ConnectorAuthResponse) Descriptor() ([]byte, []int)
Deprecated: Use ConnectorAuthResponse.ProtoReflect.Descriptor instead.
func (*ConnectorAuthResponse) GetKey ¶
func (x *ConnectorAuthResponse) GetKey() string
func (*ConnectorAuthResponse) GetTenantId ¶
func (x *ConnectorAuthResponse) GetTenantId() string
func (*ConnectorAuthResponse) ProtoMessage ¶
func (*ConnectorAuthResponse) ProtoMessage()
func (*ConnectorAuthResponse) ProtoReflect ¶
func (x *ConnectorAuthResponse) ProtoReflect() protoreflect.Message
func (*ConnectorAuthResponse) Reset ¶
func (x *ConnectorAuthResponse) Reset()
func (*ConnectorAuthResponse) String ¶
func (x *ConnectorAuthResponse) String() string
type ConnectorType ¶
type ConnectorType int32
const ( ConnectorType_AGENT ConnectorType = 0 ConnectorType_COLLECTOR ConnectorType = 1 )
func (ConnectorType) Descriptor ¶
func (ConnectorType) Descriptor() protoreflect.EnumDescriptor
func (ConnectorType) Enum ¶
func (x ConnectorType) Enum() *ConnectorType
func (ConnectorType) EnumDescriptor
deprecated
func (ConnectorType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ConnectorType.Descriptor instead.
func (ConnectorType) Number ¶
func (x ConnectorType) Number() protoreflect.EnumNumber
func (ConnectorType) String ¶
func (x ConnectorType) String() string
func (ConnectorType) Type ¶
func (ConnectorType) Type() protoreflect.EnumType
type DeleteRequest ¶
type DeleteRequest struct {
DeletedBy string `protobuf:"bytes,1,opt,name=deleted_by,json=deletedBy,proto3" json:"deleted_by,omitempty"`
// contains filtered or unexported fields
}
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetDeletedBy ¶
func (x *DeleteRequest) GetDeletedBy() string
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type Heartbeat ¶
type Heartbeat struct {
// contains filtered or unexported fields
}
Heartbeat keeps an idle control stream from looking abandoned to whatever sits between a connector and the server. Proxies end a request body that stops arriving, and a stream that says nothing for minutes is exactly that: nginx cuts it, the connector sees RST_STREAM, and until it reconnects no command can reach the machine. It carries no fields because it has nothing to say — that it arrived at all is the whole message.
func (*Heartbeat) Descriptor
deprecated
func (*Heartbeat) ProtoMessage ¶
func (*Heartbeat) ProtoMessage()
func (*Heartbeat) ProtoReflect ¶
func (x *Heartbeat) ProtoReflect() protoreflect.Message
type ListAgentsCommandsResponse ¶
type ListAgentsCommandsResponse struct {
Rows []*AgentCommand `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows,omitempty"`
Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
// contains filtered or unexported fields
}
func (*ListAgentsCommandsResponse) Descriptor
deprecated
func (*ListAgentsCommandsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListAgentsCommandsResponse.ProtoReflect.Descriptor instead.
func (*ListAgentsCommandsResponse) GetRows ¶
func (x *ListAgentsCommandsResponse) GetRows() []*AgentCommand
func (*ListAgentsCommandsResponse) GetTotal ¶
func (x *ListAgentsCommandsResponse) GetTotal() int32
func (*ListAgentsCommandsResponse) ProtoMessage ¶
func (*ListAgentsCommandsResponse) ProtoMessage()
func (*ListAgentsCommandsResponse) ProtoReflect ¶
func (x *ListAgentsCommandsResponse) ProtoReflect() protoreflect.Message
func (*ListAgentsCommandsResponse) Reset ¶
func (x *ListAgentsCommandsResponse) Reset()
func (*ListAgentsCommandsResponse) String ¶
func (x *ListAgentsCommandsResponse) String() string
type ListAgentsResponse ¶
type ListAgentsResponse struct {
Rows []*Agent `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows,omitempty"`
Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
// contains filtered or unexported fields
}
func (*ListAgentsResponse) Descriptor
deprecated
func (*ListAgentsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListAgentsResponse.ProtoReflect.Descriptor instead.
func (*ListAgentsResponse) GetRows ¶
func (x *ListAgentsResponse) GetRows() []*Agent
func (*ListAgentsResponse) GetTotal ¶
func (x *ListAgentsResponse) GetTotal() int32
func (*ListAgentsResponse) ProtoMessage ¶
func (*ListAgentsResponse) ProtoMessage()
func (*ListAgentsResponse) ProtoReflect ¶
func (x *ListAgentsResponse) ProtoReflect() protoreflect.Message
func (*ListAgentsResponse) Reset ¶
func (x *ListAgentsResponse) Reset()
func (*ListAgentsResponse) String ¶
func (x *ListAgentsResponse) String() string
type ListRequest ¶
type ListRequest struct {
PageNumber int32 `protobuf:"varint,1,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"`
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
SearchQuery string `protobuf:"bytes,3,opt,name=search_query,json=searchQuery,proto3" json:"search_query,omitempty"`
SortBy string `protobuf:"bytes,4,opt,name=sort_by,json=sortBy,proto3" json:"sort_by,omitempty"`
// Which tenant to list. Empty means every tenant, which only the platform
// may ask for; a tenant-scoped caller always sets it.
TenantId string `protobuf:"bytes,5,opt,name=tenantId,proto3" json:"tenantId,omitempty"`
// contains filtered or unexported fields
}
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetPageNumber ¶
func (x *ListRequest) GetPageNumber() int32
func (*ListRequest) GetPageSize ¶
func (x *ListRequest) GetPageSize() int32
func (*ListRequest) GetSearchQuery ¶
func (x *ListRequest) GetSearchQuery() string
func (*ListRequest) GetSortBy ¶
func (x *ListRequest) GetSortBy() string
func (*ListRequest) GetTenantId ¶
func (x *ListRequest) GetTenantId() string
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
type LogProcessor ¶
type LogProcessor struct {
// contains filtered or unexported fields
}
func GetLogProcessor ¶
func GetLogProcessor() (*LogProcessor, error)
func (*LogProcessor) CleanCountedLogs ¶
func (l *LogProcessor) CleanCountedLogs()
func (*LogProcessor) ProcessLogs ¶
func (l *LogProcessor) ProcessLogs(cnf *config.Config, ctx context.Context)
type PanelServiceClient ¶
type PanelServiceClient interface {
ProcessCommand(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[UtmCommand, CommandResult], error)
GetConnectionKey(ctx context.Context, in *ConnectionKeyRequest, opts ...grpc.CallOption) (*ConnectionKeyResponse, error)
RotateConnectionKey(ctx context.Context, in *ConnectionKeyRequest, opts ...grpc.CallOption) (*ConnectionKeyResponse, error)
// SetAgentConfig sets the authoritative content for a named config key,
// bumping its version. Agents pick it up on their next ConfigState
// report (see BidirectionalStream) — this call does not push anything
// itself, it only changes what the server considers current.
SetAgentConfig(ctx context.Context, in *SetAgentConfigRequest, opts ...grpc.CallOption) (*SetAgentConfigResponse, error)
}
PanelServiceClient is the client API for PanelService 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 NewPanelServiceClient ¶
func NewPanelServiceClient(cc grpc.ClientConnInterface) PanelServiceClient
type PanelServiceServer ¶
type PanelServiceServer interface {
ProcessCommand(grpc.BidiStreamingServer[UtmCommand, CommandResult]) error
GetConnectionKey(context.Context, *ConnectionKeyRequest) (*ConnectionKeyResponse, error)
RotateConnectionKey(context.Context, *ConnectionKeyRequest) (*ConnectionKeyResponse, error)
// SetAgentConfig sets the authoritative content for a named config key,
// bumping its version. Agents pick it up on their next ConfigState
// report (see BidirectionalStream) — this call does not push anything
// itself, it only changes what the server considers current.
SetAgentConfig(context.Context, *SetAgentConfigRequest) (*SetAgentConfigResponse, error)
// contains filtered or unexported methods
}
PanelServiceServer is the server API for PanelService service. All implementations must embed UnimplementedPanelServiceServer for forward compatibility.
type PanelService_ProcessCommandClient ¶
type PanelService_ProcessCommandClient = grpc.BidiStreamingClient[UtmCommand, CommandResult]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PanelService_ProcessCommandServer ¶
type PanelService_ProcessCommandServer = grpc.BidiStreamingServer[UtmCommand, CommandResult]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PingRequest ¶
type PingRequest struct {
Type ConnectorType `protobuf:"varint,1,opt,name=type,proto3,enum=agent.ConnectorType" json:"type,omitempty"`
// contains filtered or unexported fields
}
func (*PingRequest) Descriptor
deprecated
func (*PingRequest) Descriptor() ([]byte, []int)
Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.
func (*PingRequest) GetType ¶
func (x *PingRequest) GetType() ConnectorType
func (*PingRequest) ProtoMessage ¶
func (*PingRequest) ProtoMessage()
func (*PingRequest) ProtoReflect ¶
func (x *PingRequest) ProtoReflect() protoreflect.Message
func (*PingRequest) Reset ¶
func (x *PingRequest) Reset()
func (*PingRequest) String ¶
func (x *PingRequest) String() string
type PingResponse ¶
type PingResponse struct {
Received string `protobuf:"bytes,1,opt,name=received,proto3" json:"received,omitempty"`
// contains filtered or unexported fields
}
func (*PingResponse) Descriptor
deprecated
func (*PingResponse) Descriptor() ([]byte, []int)
Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.
func (*PingResponse) GetReceived ¶
func (x *PingResponse) GetReceived() string
func (*PingResponse) ProtoMessage ¶
func (*PingResponse) ProtoMessage()
func (*PingResponse) ProtoReflect ¶
func (x *PingResponse) ProtoReflect() protoreflect.Message
func (*PingResponse) Reset ¶
func (x *PingResponse) Reset()
func (*PingResponse) String ¶
func (x *PingResponse) String() string
type PingServiceClient ¶
type PingServiceClient interface {
Ping(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[PingRequest, PingResponse], error)
}
PingServiceClient is the client API for PingService 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 NewPingServiceClient ¶
func NewPingServiceClient(cc grpc.ClientConnInterface) PingServiceClient
type PingServiceServer ¶
type PingServiceServer interface {
Ping(grpc.ClientStreamingServer[PingRequest, PingResponse]) error
// contains filtered or unexported methods
}
PingServiceServer is the server API for PingService service. All implementations must embed UnimplementedPingServiceServer for forward compatibility.
type PingService_PingClient ¶
type PingService_PingClient = grpc.ClientStreamingClient[PingRequest, PingResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PingService_PingServer ¶
type PingService_PingServer = grpc.ClientStreamingServer[PingRequest, PingResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type SetAgentConfigRequest ¶
type SetAgentConfigRequest struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
// 0 (default) targets the whole fleet; a specific agent id overrides
// just that agent, taking priority over the fleet-wide value for it.
AgentId uint32 `protobuf:"varint,3,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
// contains filtered or unexported fields
}
func (*SetAgentConfigRequest) Descriptor
deprecated
func (*SetAgentConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetAgentConfigRequest.ProtoReflect.Descriptor instead.
func (*SetAgentConfigRequest) GetAgentId ¶
func (x *SetAgentConfigRequest) GetAgentId() uint32
func (*SetAgentConfigRequest) GetContent ¶
func (x *SetAgentConfigRequest) GetContent() string
func (*SetAgentConfigRequest) GetKey ¶
func (x *SetAgentConfigRequest) GetKey() string
func (*SetAgentConfigRequest) ProtoMessage ¶
func (*SetAgentConfigRequest) ProtoMessage()
func (*SetAgentConfigRequest) ProtoReflect ¶
func (x *SetAgentConfigRequest) ProtoReflect() protoreflect.Message
func (*SetAgentConfigRequest) Reset ¶
func (x *SetAgentConfigRequest) Reset()
func (*SetAgentConfigRequest) String ¶
func (x *SetAgentConfigRequest) String() string
type SetAgentConfigResponse ¶
type SetAgentConfigResponse struct {
Revision uint64 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
// contains filtered or unexported fields
}
func (*SetAgentConfigResponse) Descriptor
deprecated
func (*SetAgentConfigResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetAgentConfigResponse.ProtoReflect.Descriptor instead.
func (*SetAgentConfigResponse) GetRevision ¶
func (x *SetAgentConfigResponse) GetRevision() uint64
func (*SetAgentConfigResponse) ProtoMessage ¶
func (*SetAgentConfigResponse) ProtoMessage()
func (*SetAgentConfigResponse) ProtoReflect ¶
func (x *SetAgentConfigResponse) ProtoReflect() protoreflect.Message
func (*SetAgentConfigResponse) Reset ¶
func (x *SetAgentConfigResponse) Reset()
func (*SetAgentConfigResponse) String ¶
func (x *SetAgentConfigResponse) String() string
type SourceStats ¶
type Status ¶
type Status int32
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
type StatusSnapshot ¶
type StatusSnapshot struct {
GeneratedAt time.Time `json:"generated_at"`
Sources map[string]SourceStats `json:"sources"`
}
func ReadStatus ¶
func ReadStatus() (*StatusSnapshot, error)
type UnimplementedAgentServiceServer ¶
type UnimplementedAgentServiceServer struct{}
UnimplementedAgentServiceServer 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 (UnimplementedAgentServiceServer) AgentStream ¶
func (UnimplementedAgentServiceServer) AgentStream(grpc.BidiStreamingServer[BidirectionalStream, BidirectionalStream]) error
func (UnimplementedAgentServiceServer) DeleteAgent ¶
func (UnimplementedAgentServiceServer) DeleteAgent(context.Context, *DeleteRequest) (*AuthResponse, error)
func (UnimplementedAgentServiceServer) GetAgentAuth ¶
func (UnimplementedAgentServiceServer) GetAgentAuth(context.Context, *ConnectorAuthRequest) (*ConnectorAuthResponse, error)
func (UnimplementedAgentServiceServer) ListAgentCommands ¶
func (UnimplementedAgentServiceServer) ListAgentCommands(context.Context, *ListRequest) (*ListAgentsCommandsResponse, error)
func (UnimplementedAgentServiceServer) ListAgents ¶
func (UnimplementedAgentServiceServer) ListAgents(context.Context, *ListRequest) (*ListAgentsResponse, error)
func (UnimplementedAgentServiceServer) RegisterAgent ¶
func (UnimplementedAgentServiceServer) RegisterAgent(context.Context, *AgentRequest) (*AuthResponse, error)
func (UnimplementedAgentServiceServer) UpdateAgent ¶
func (UnimplementedAgentServiceServer) UpdateAgent(context.Context, *AgentRequest) (*AuthResponse, error)
type UnimplementedPanelServiceServer ¶
type UnimplementedPanelServiceServer struct{}
UnimplementedPanelServiceServer 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 (UnimplementedPanelServiceServer) GetConnectionKey ¶
func (UnimplementedPanelServiceServer) GetConnectionKey(context.Context, *ConnectionKeyRequest) (*ConnectionKeyResponse, error)
func (UnimplementedPanelServiceServer) ProcessCommand ¶
func (UnimplementedPanelServiceServer) ProcessCommand(grpc.BidiStreamingServer[UtmCommand, CommandResult]) error
func (UnimplementedPanelServiceServer) RotateConnectionKey ¶
func (UnimplementedPanelServiceServer) RotateConnectionKey(context.Context, *ConnectionKeyRequest) (*ConnectionKeyResponse, error)
func (UnimplementedPanelServiceServer) SetAgentConfig ¶
func (UnimplementedPanelServiceServer) SetAgentConfig(context.Context, *SetAgentConfigRequest) (*SetAgentConfigResponse, error)
type UnimplementedPingServiceServer ¶
type UnimplementedPingServiceServer struct{}
UnimplementedPingServiceServer 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.
type UnsafeAgentServiceServer ¶
type UnsafeAgentServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAgentServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AgentServiceServer will result in compilation errors.
type UnsafePanelServiceServer ¶
type UnsafePanelServiceServer interface {
// contains filtered or unexported methods
}
UnsafePanelServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PanelServiceServer will result in compilation errors.
type UnsafePingServiceServer ¶
type UnsafePingServiceServer interface {
// contains filtered or unexported methods
}
UnsafePingServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PingServiceServer will result in compilation errors.
type UtmCommand ¶
type UtmCommand struct {
AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
Command string `protobuf:"bytes,2,opt,name=command,proto3" json:"command,omitempty"`
ExecutedBy string `protobuf:"bytes,3,opt,name=executed_by,json=executedBy,proto3" json:"executed_by,omitempty"`
CmdId string `protobuf:"bytes,4,opt,name=cmd_id,json=cmdId,proto3" json:"cmd_id,omitempty"`
OriginType string `protobuf:"bytes,5,opt,name=origin_type,json=originType,proto3" json:"origin_type,omitempty"`
OriginId string `protobuf:"bytes,6,opt,name=origin_id,json=originId,proto3" json:"origin_id,omitempty"`
Reason string `protobuf:"bytes,7,opt,name=reason,proto3" json:"reason,omitempty"`
Shell string `protobuf:"bytes,8,opt,name=shell,proto3" json:"shell,omitempty"` // Shell to execute command: "cmd", "powershell" (Windows), "sh", "bash" (Linux/macOS). Empty = default
// contains filtered or unexported fields
}
func (*UtmCommand) Descriptor
deprecated
func (*UtmCommand) Descriptor() ([]byte, []int)
Deprecated: Use UtmCommand.ProtoReflect.Descriptor instead.
func (*UtmCommand) GetAgentId ¶
func (x *UtmCommand) GetAgentId() string
func (*UtmCommand) GetCmdId ¶
func (x *UtmCommand) GetCmdId() string
func (*UtmCommand) GetCommand ¶
func (x *UtmCommand) GetCommand() string
func (*UtmCommand) GetExecutedBy ¶
func (x *UtmCommand) GetExecutedBy() string
func (*UtmCommand) GetOriginId ¶
func (x *UtmCommand) GetOriginId() string
func (*UtmCommand) GetOriginType ¶
func (x *UtmCommand) GetOriginType() string
func (*UtmCommand) GetReason ¶
func (x *UtmCommand) GetReason() string
func (*UtmCommand) GetShell ¶
func (x *UtmCommand) GetShell() string
func (*UtmCommand) ProtoMessage ¶
func (*UtmCommand) ProtoMessage()
func (*UtmCommand) ProtoReflect ¶
func (x *UtmCommand) ProtoReflect() protoreflect.Message
func (*UtmCommand) Reset ¶
func (x *UtmCommand) Reset()
func (*UtmCommand) String ¶
func (x *UtmCommand) String() string