Найбільше вузьке місце до запуску: агент заводився INSERT-ом у базу, а токен вписувався в командний рядок руками. Поставити зонд у клієнта було неможливо. core.agent_enrollments тримає sha256 одноразового токена; сам токен повертається рівно один раз. Видача під FOR UPDATE в одній транзакції: два агенти з однієї скопійованої команди інакше створили б два зонди з одного запрошення. Відповідь на «немає», «згоріло» і «використано» однакова — розрізняти їх означає підказувати тому, хто підбирає токени. Токен зонда їде окремим полем agent_token, а не в certificate: сертифікат відповідає на інше питання й живе за іншим циклом. Агент зберігає посвідчення в /etc/netpulse/agent.json з правами 0600, через тимчасовий файл і перейменування — обрив живлення посеред запису інакше лишив би половину токена. Знайдено живим прогоном: реєстрація не проходила автентифікацію, бо інтерсептор стоїть на всьому сервері, а не на окремому сервісі — мій же коментар стверджував протилежне. І запуск із самим посвідченням падав: validate() вимагав -agent-id, не знаючи про файл. Сторінка зондів: команда встановлення з токеном, відкликання запрошень, керування модулями й лімітами, видалення. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2619 lines
85 KiB
Go
2619 lines
85 KiB
Go
// =====================================================================
|
||
// NetPulse :: agent.proto
|
||
// Головний контракт агент↔сервер.
|
||
//
|
||
// ФУНДАМЕНТАЛЬНЕ ОБМЕЖЕННЯ: усі з'єднання ініціює агент.
|
||
// Сервер ніколи не стукає в мережу клієнта — там немає ані відкритих
|
||
// портів, ані прокидання NAT. Тому "команда з сервера" фізично є
|
||
// повідомленням у зустрічному напрямку вже відкритого агентом
|
||
// bidi-стріму Control.
|
||
// =====================================================================
|
||
|
||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||
// versions:
|
||
// protoc-gen-go v1.36.12
|
||
// protoc (unknown)
|
||
// source: netpulse/v1/agent.proto
|
||
|
||
package netpulsev1
|
||
|
||
import (
|
||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||
durationpb "google.golang.org/protobuf/types/known/durationpb"
|
||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||
reflect "reflect"
|
||
sync "sync"
|
||
unsafe "unsafe"
|
||
)
|
||
|
||
const (
|
||
// Verify that this generated code is sufficiently up-to-date.
|
||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||
)
|
||
|
||
type TaskStatusUpdate_State int32
|
||
|
||
const (
|
||
TaskStatusUpdate_STATE_UNSPECIFIED TaskStatusUpdate_State = 0
|
||
TaskStatusUpdate_STATE_ACCEPTED TaskStatusUpdate_State = 1
|
||
TaskStatusUpdate_STATE_RUNNING TaskStatusUpdate_State = 2
|
||
TaskStatusUpdate_STATE_SUCCEEDED TaskStatusUpdate_State = 3
|
||
TaskStatusUpdate_STATE_FAILED TaskStatusUpdate_State = 4
|
||
TaskStatusUpdate_STATE_SKIPPED TaskStatusUpdate_State = 5 // не встиг у вікно інтервалу
|
||
TaskStatusUpdate_STATE_REJECTED TaskStatusUpdate_State = 6 // модуль не активний або параметри невалідні
|
||
)
|
||
|
||
// Enum value maps for TaskStatusUpdate_State.
|
||
var (
|
||
TaskStatusUpdate_State_name = map[int32]string{
|
||
0: "STATE_UNSPECIFIED",
|
||
1: "STATE_ACCEPTED",
|
||
2: "STATE_RUNNING",
|
||
3: "STATE_SUCCEEDED",
|
||
4: "STATE_FAILED",
|
||
5: "STATE_SKIPPED",
|
||
6: "STATE_REJECTED",
|
||
}
|
||
TaskStatusUpdate_State_value = map[string]int32{
|
||
"STATE_UNSPECIFIED": 0,
|
||
"STATE_ACCEPTED": 1,
|
||
"STATE_RUNNING": 2,
|
||
"STATE_SUCCEEDED": 3,
|
||
"STATE_FAILED": 4,
|
||
"STATE_SKIPPED": 5,
|
||
"STATE_REJECTED": 6,
|
||
}
|
||
)
|
||
|
||
func (x TaskStatusUpdate_State) Enum() *TaskStatusUpdate_State {
|
||
p := new(TaskStatusUpdate_State)
|
||
*p = x
|
||
return p
|
||
}
|
||
|
||
func (x TaskStatusUpdate_State) String() string {
|
||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||
}
|
||
|
||
func (TaskStatusUpdate_State) Descriptor() protoreflect.EnumDescriptor {
|
||
return file_netpulse_v1_agent_proto_enumTypes[0].Descriptor()
|
||
}
|
||
|
||
func (TaskStatusUpdate_State) Type() protoreflect.EnumType {
|
||
return &file_netpulse_v1_agent_proto_enumTypes[0]
|
||
}
|
||
|
||
func (x TaskStatusUpdate_State) Number() protoreflect.EnumNumber {
|
||
return protoreflect.EnumNumber(x)
|
||
}
|
||
|
||
// Deprecated: Use TaskStatusUpdate_State.Descriptor instead.
|
||
func (TaskStatusUpdate_State) EnumDescriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{5, 0}
|
||
}
|
||
|
||
type AgentEvent_Kind int32
|
||
|
||
const (
|
||
AgentEvent_KIND_UNSPECIFIED AgentEvent_Kind = 0
|
||
AgentEvent_KIND_STARTED AgentEvent_Kind = 1
|
||
AgentEvent_KIND_STOPPING AgentEvent_Kind = 2
|
||
AgentEvent_KIND_MODULE_CRASH AgentEvent_Kind = 3
|
||
AgentEvent_KIND_BUFFER_OVERFLOW AgentEvent_Kind = 4
|
||
AgentEvent_KIND_CLOCK_JUMP AgentEvent_Kind = 5
|
||
AgentEvent_KIND_UPDATE_APPLIED AgentEvent_Kind = 6
|
||
AgentEvent_KIND_CONFIG_REJECTED AgentEvent_Kind = 7
|
||
)
|
||
|
||
// Enum value maps for AgentEvent_Kind.
|
||
var (
|
||
AgentEvent_Kind_name = map[int32]string{
|
||
0: "KIND_UNSPECIFIED",
|
||
1: "KIND_STARTED",
|
||
2: "KIND_STOPPING",
|
||
3: "KIND_MODULE_CRASH",
|
||
4: "KIND_BUFFER_OVERFLOW",
|
||
5: "KIND_CLOCK_JUMP",
|
||
6: "KIND_UPDATE_APPLIED",
|
||
7: "KIND_CONFIG_REJECTED",
|
||
}
|
||
AgentEvent_Kind_value = map[string]int32{
|
||
"KIND_UNSPECIFIED": 0,
|
||
"KIND_STARTED": 1,
|
||
"KIND_STOPPING": 2,
|
||
"KIND_MODULE_CRASH": 3,
|
||
"KIND_BUFFER_OVERFLOW": 4,
|
||
"KIND_CLOCK_JUMP": 5,
|
||
"KIND_UPDATE_APPLIED": 6,
|
||
"KIND_CONFIG_REJECTED": 7,
|
||
}
|
||
)
|
||
|
||
func (x AgentEvent_Kind) Enum() *AgentEvent_Kind {
|
||
p := new(AgentEvent_Kind)
|
||
*p = x
|
||
return p
|
||
}
|
||
|
||
func (x AgentEvent_Kind) String() string {
|
||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||
}
|
||
|
||
func (AgentEvent_Kind) Descriptor() protoreflect.EnumDescriptor {
|
||
return file_netpulse_v1_agent_proto_enumTypes[1].Descriptor()
|
||
}
|
||
|
||
func (AgentEvent_Kind) Type() protoreflect.EnumType {
|
||
return &file_netpulse_v1_agent_proto_enumTypes[1]
|
||
}
|
||
|
||
func (x AgentEvent_Kind) Number() protoreflect.EnumNumber {
|
||
return protoreflect.EnumNumber(x)
|
||
}
|
||
|
||
// Deprecated: Use AgentEvent_Kind.Descriptor instead.
|
||
func (AgentEvent_Kind) EnumDescriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{9, 0}
|
||
}
|
||
|
||
type Directive_Action int32
|
||
|
||
const (
|
||
Directive_ACTION_UNSPECIFIED Directive_Action = 0
|
||
// Перечитати конфігурацію, не розриваючи сесію.
|
||
Directive_ACTION_RELOAD Directive_Action = 1
|
||
// Дозбирати й відправити буфер, потім коректно завершитись.
|
||
Directive_ACTION_DRAIN Directive_Action = 2
|
||
// Зупинити опитування, лишити канал (несплата → grace-період).
|
||
Directive_ACTION_PAUSE Directive_Action = 3
|
||
Directive_ACTION_RESUME Directive_Action = 4
|
||
// Доступне оновлення: деталі в update.
|
||
Directive_ACTION_UPDATE Directive_Action = 5
|
||
// Перепідключитись (перебалансування сервера). Агент чекає
|
||
// reconnect_after і йде на новий endpoint.
|
||
Directive_ACTION_RECONNECT Directive_Action = 6
|
||
// Скинути локальну таблицю series_ref і перереєструвати серії.
|
||
Directive_ACTION_RESET_SERIES_TABLE Directive_Action = 7
|
||
)
|
||
|
||
// Enum value maps for Directive_Action.
|
||
var (
|
||
Directive_Action_name = map[int32]string{
|
||
0: "ACTION_UNSPECIFIED",
|
||
1: "ACTION_RELOAD",
|
||
2: "ACTION_DRAIN",
|
||
3: "ACTION_PAUSE",
|
||
4: "ACTION_RESUME",
|
||
5: "ACTION_UPDATE",
|
||
6: "ACTION_RECONNECT",
|
||
7: "ACTION_RESET_SERIES_TABLE",
|
||
}
|
||
Directive_Action_value = map[string]int32{
|
||
"ACTION_UNSPECIFIED": 0,
|
||
"ACTION_RELOAD": 1,
|
||
"ACTION_DRAIN": 2,
|
||
"ACTION_PAUSE": 3,
|
||
"ACTION_RESUME": 4,
|
||
"ACTION_UPDATE": 5,
|
||
"ACTION_RECONNECT": 6,
|
||
"ACTION_RESET_SERIES_TABLE": 7,
|
||
}
|
||
)
|
||
|
||
func (x Directive_Action) Enum() *Directive_Action {
|
||
p := new(Directive_Action)
|
||
*p = x
|
||
return p
|
||
}
|
||
|
||
func (x Directive_Action) String() string {
|
||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||
}
|
||
|
||
func (Directive_Action) Descriptor() protoreflect.EnumDescriptor {
|
||
return file_netpulse_v1_agent_proto_enumTypes[2].Descriptor()
|
||
}
|
||
|
||
func (Directive_Action) Type() protoreflect.EnumType {
|
||
return &file_netpulse_v1_agent_proto_enumTypes[2]
|
||
}
|
||
|
||
func (x Directive_Action) Number() protoreflect.EnumNumber {
|
||
return protoreflect.EnumNumber(x)
|
||
}
|
||
|
||
// Deprecated: Use Directive_Action.Descriptor instead.
|
||
func (Directive_Action) EnumDescriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{21, 0}
|
||
}
|
||
|
||
type EnrollRequest struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
// Одноразовий токен із UI: "np_enroll_...". Згорає після використання.
|
||
EnrollmentToken string `protobuf:"bytes,1,opt,name=enrollment_token,json=enrollmentToken,proto3" json:"enrollment_token,omitempty"`
|
||
// PKCS#10. Приватний ключ ніколи не залишає агента.
|
||
Csr []byte `protobuf:"bytes,2,opt,name=csr,proto3" json:"csr,omitempty"`
|
||
Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"`
|
||
Build *AgentBuild `protobuf:"bytes,4,opt,name=build,proto3" json:"build,omitempty"`
|
||
// Бажане ім'я зонда; сервер може змінити на унікальне.
|
||
RequestedName string `protobuf:"bytes,5,opt,name=requested_name,json=requestedName,proto3" json:"requested_name,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *EnrollRequest) Reset() {
|
||
*x = EnrollRequest{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[0]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *EnrollRequest) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*EnrollRequest) ProtoMessage() {}
|
||
|
||
func (x *EnrollRequest) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[0]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use EnrollRequest.ProtoReflect.Descriptor instead.
|
||
func (*EnrollRequest) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{0}
|
||
}
|
||
|
||
func (x *EnrollRequest) GetEnrollmentToken() string {
|
||
if x != nil {
|
||
return x.EnrollmentToken
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *EnrollRequest) GetCsr() []byte {
|
||
if x != nil {
|
||
return x.Csr
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *EnrollRequest) GetHostname() string {
|
||
if x != nil {
|
||
return x.Hostname
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *EnrollRequest) GetBuild() *AgentBuild {
|
||
if x != nil {
|
||
return x.Build
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *EnrollRequest) GetRequestedName() string {
|
||
if x != nil {
|
||
return x.RequestedName
|
||
}
|
||
return ""
|
||
}
|
||
|
||
type EnrollResponse struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
|
||
AgentName string `protobuf:"bytes,2,opt,name=agent_name,json=agentName,proto3" json:"agent_name,omitempty"`
|
||
// Підписаний клієнтський сертифікат + ланцюг CA сервера.
|
||
Certificate []byte `protobuf:"bytes,3,opt,name=certificate,proto3" json:"certificate,omitempty"`
|
||
CaChain []byte `protobuf:"bytes,4,opt,name=ca_chain,json=caChain,proto3" json:"ca_chain,omitempty"`
|
||
CertificateExpiresAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=certificate_expires_at,json=certificateExpiresAt,proto3" json:"certificate_expires_at,omitempty"`
|
||
// Куди підключатись далі (може відрізнятись від адреси реєстрації:
|
||
// балансувальник, регіональний шлюз).
|
||
ControlEndpoint string `protobuf:"bytes,6,opt,name=control_endpoint,json=controlEndpoint,proto3" json:"control_endpoint,omitempty"`
|
||
// Постійний токен зонда: визначає, ЯКИЙ це зонд. Видається рівно
|
||
// один раз — далі агент зберігає його сам.
|
||
//
|
||
// Окреме поле, а не certificate: сертифікат відповідає на інше
|
||
// питання («чи має право говорити з сервером») і живе за іншим
|
||
// життєвим циклом. Складати два різні секрети в одне поле означає
|
||
// зафіксувати проміжний етап у протоколі назавжди.
|
||
AgentToken string `protobuf:"bytes,7,opt,name=agent_token,json=agentToken,proto3" json:"agent_token,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *EnrollResponse) Reset() {
|
||
*x = EnrollResponse{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[1]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *EnrollResponse) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*EnrollResponse) ProtoMessage() {}
|
||
|
||
func (x *EnrollResponse) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[1]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use EnrollResponse.ProtoReflect.Descriptor instead.
|
||
func (*EnrollResponse) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{1}
|
||
}
|
||
|
||
func (x *EnrollResponse) GetAgentId() string {
|
||
if x != nil {
|
||
return x.AgentId
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *EnrollResponse) GetAgentName() string {
|
||
if x != nil {
|
||
return x.AgentName
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *EnrollResponse) GetCertificate() []byte {
|
||
if x != nil {
|
||
return x.Certificate
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *EnrollResponse) GetCaChain() []byte {
|
||
if x != nil {
|
||
return x.CaChain
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *EnrollResponse) GetCertificateExpiresAt() *timestamppb.Timestamp {
|
||
if x != nil {
|
||
return x.CertificateExpiresAt
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *EnrollResponse) GetControlEndpoint() string {
|
||
if x != nil {
|
||
return x.ControlEndpoint
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *EnrollResponse) GetAgentToken() string {
|
||
if x != nil {
|
||
return x.AgentToken
|
||
}
|
||
return ""
|
||
}
|
||
|
||
type ControlUp struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
// Монотонний номер повідомлення в сесії — для трасування.
|
||
Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"`
|
||
// Types that are valid to be assigned to Payload:
|
||
//
|
||
// *ControlUp_Hello
|
||
// *ControlUp_Heartbeat
|
||
// *ControlUp_TaskStatus
|
||
// *ControlUp_ModuleStatus
|
||
// *ControlUp_ConfigApplyResult
|
||
// *ControlUp_CredentialRequest
|
||
// *ControlUp_Pong
|
||
// *ControlUp_Event
|
||
Payload isControlUp_Payload `protobuf_oneof:"payload"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *ControlUp) Reset() {
|
||
*x = ControlUp{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[2]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *ControlUp) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*ControlUp) ProtoMessage() {}
|
||
|
||
func (x *ControlUp) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[2]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use ControlUp.ProtoReflect.Descriptor instead.
|
||
func (*ControlUp) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{2}
|
||
}
|
||
|
||
func (x *ControlUp) GetSeq() uint64 {
|
||
if x != nil {
|
||
return x.Seq
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *ControlUp) GetPayload() isControlUp_Payload {
|
||
if x != nil {
|
||
return x.Payload
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *ControlUp) GetHello() *Hello {
|
||
if x != nil {
|
||
if x, ok := x.Payload.(*ControlUp_Hello); ok {
|
||
return x.Hello
|
||
}
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *ControlUp) GetHeartbeat() *Heartbeat {
|
||
if x != nil {
|
||
if x, ok := x.Payload.(*ControlUp_Heartbeat); ok {
|
||
return x.Heartbeat
|
||
}
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *ControlUp) GetTaskStatus() *TaskStatusUpdate {
|
||
if x != nil {
|
||
if x, ok := x.Payload.(*ControlUp_TaskStatus); ok {
|
||
return x.TaskStatus
|
||
}
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *ControlUp) GetModuleStatus() *ModuleStatusUpdate {
|
||
if x != nil {
|
||
if x, ok := x.Payload.(*ControlUp_ModuleStatus); ok {
|
||
return x.ModuleStatus
|
||
}
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *ControlUp) GetConfigApplyResult() *ConfigApplyResult {
|
||
if x != nil {
|
||
if x, ok := x.Payload.(*ControlUp_ConfigApplyResult); ok {
|
||
return x.ConfigApplyResult
|
||
}
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *ControlUp) GetCredentialRequest() *CredentialRequest {
|
||
if x != nil {
|
||
if x, ok := x.Payload.(*ControlUp_CredentialRequest); ok {
|
||
return x.CredentialRequest
|
||
}
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *ControlUp) GetPong() *Pong {
|
||
if x != nil {
|
||
if x, ok := x.Payload.(*ControlUp_Pong); ok {
|
||
return x.Pong
|
||
}
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *ControlUp) GetEvent() *AgentEvent {
|
||
if x != nil {
|
||
if x, ok := x.Payload.(*ControlUp_Event); ok {
|
||
return x.Event
|
||
}
|
||
}
|
||
return nil
|
||
}
|
||
|
||
type isControlUp_Payload interface {
|
||
isControlUp_Payload()
|
||
}
|
||
|
||
type ControlUp_Hello struct {
|
||
Hello *Hello `protobuf:"bytes,2,opt,name=hello,proto3,oneof"`
|
||
}
|
||
|
||
type ControlUp_Heartbeat struct {
|
||
Heartbeat *Heartbeat `protobuf:"bytes,3,opt,name=heartbeat,proto3,oneof"`
|
||
}
|
||
|
||
type ControlUp_TaskStatus struct {
|
||
TaskStatus *TaskStatusUpdate `protobuf:"bytes,4,opt,name=task_status,json=taskStatus,proto3,oneof"`
|
||
}
|
||
|
||
type ControlUp_ModuleStatus struct {
|
||
ModuleStatus *ModuleStatusUpdate `protobuf:"bytes,5,opt,name=module_status,json=moduleStatus,proto3,oneof"`
|
||
}
|
||
|
||
type ControlUp_ConfigApplyResult struct {
|
||
ConfigApplyResult *ConfigApplyResult `protobuf:"bytes,6,opt,name=config_apply_result,json=configApplyResult,proto3,oneof"`
|
||
}
|
||
|
||
type ControlUp_CredentialRequest struct {
|
||
CredentialRequest *CredentialRequest `protobuf:"bytes,7,opt,name=credential_request,json=credentialRequest,proto3,oneof"`
|
||
}
|
||
|
||
type ControlUp_Pong struct {
|
||
Pong *Pong `protobuf:"bytes,8,opt,name=pong,proto3,oneof"`
|
||
}
|
||
|
||
type ControlUp_Event struct {
|
||
Event *AgentEvent `protobuf:"bytes,9,opt,name=event,proto3,oneof"`
|
||
}
|
||
|
||
func (*ControlUp_Hello) isControlUp_Payload() {}
|
||
|
||
func (*ControlUp_Heartbeat) isControlUp_Payload() {}
|
||
|
||
func (*ControlUp_TaskStatus) isControlUp_Payload() {}
|
||
|
||
func (*ControlUp_ModuleStatus) isControlUp_Payload() {}
|
||
|
||
func (*ControlUp_ConfigApplyResult) isControlUp_Payload() {}
|
||
|
||
func (*ControlUp_CredentialRequest) isControlUp_Payload() {}
|
||
|
||
func (*ControlUp_Pong) isControlUp_Payload() {}
|
||
|
||
func (*ControlUp_Event) isControlUp_Payload() {}
|
||
|
||
// Перше повідомлення в стрімі. Сервер відповідає Welcome.
|
||
type Hello struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
AgentId string `protobuf:"bytes,1,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"`
|
||
Build *AgentBuild `protobuf:"bytes,2,opt,name=build,proto3" json:"build,omitempty"`
|
||
Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"`
|
||
// Локальні адреси зонда — корисно для L2-виявлення й діагностики NAT.
|
||
LocalAddresses []string `protobuf:"bytes,4,rep,name=local_addresses,json=localAddresses,proto3" json:"local_addresses,omitempty"`
|
||
StartedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"`
|
||
// Хеш конфігурації задач, яку агент має локально. Якщо збігається
|
||
// з серверним — сервер не шле повний план, лише дельти.
|
||
TaskPlanHash []byte `protobuf:"bytes,6,opt,name=task_plan_hash,json=taskPlanHash,proto3" json:"task_plan_hash,omitempty"`
|
||
// Останній батч, який агент вважає підтвердженим. Дозволяє
|
||
// продовжити з місця розриву замість повного перезливу.
|
||
LastAckedBatchId uint64 `protobuf:"varint,7,opt,name=last_acked_batch_id,json=lastAckedBatchId,proto3" json:"last_acked_batch_id,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *Hello) Reset() {
|
||
*x = Hello{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[3]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *Hello) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*Hello) ProtoMessage() {}
|
||
|
||
func (x *Hello) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[3]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use Hello.ProtoReflect.Descriptor instead.
|
||
func (*Hello) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{3}
|
||
}
|
||
|
||
func (x *Hello) GetAgentId() string {
|
||
if x != nil {
|
||
return x.AgentId
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Hello) GetBuild() *AgentBuild {
|
||
if x != nil {
|
||
return x.Build
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *Hello) GetHostname() string {
|
||
if x != nil {
|
||
return x.Hostname
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Hello) GetLocalAddresses() []string {
|
||
if x != nil {
|
||
return x.LocalAddresses
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *Hello) GetStartedAt() *timestamppb.Timestamp {
|
||
if x != nil {
|
||
return x.StartedAt
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *Hello) GetTaskPlanHash() []byte {
|
||
if x != nil {
|
||
return x.TaskPlanHash
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *Hello) GetLastAckedBatchId() uint64 {
|
||
if x != nil {
|
||
return x.LastAckedBatchId
|
||
}
|
||
return 0
|
||
}
|
||
|
||
type Heartbeat struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
Ts *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=ts,proto3" json:"ts,omitempty"`
|
||
Health *AgentHealth `protobuf:"bytes,2,opt,name=health,proto3" json:"health,omitempty"`
|
||
// Скільки задач зараз виконується / чекає в черзі.
|
||
TasksRunning uint32 `protobuf:"varint,3,opt,name=tasks_running,json=tasksRunning,proto3" json:"tasks_running,omitempty"`
|
||
TasksQueued uint32 `protobuf:"varint,4,opt,name=tasks_queued,json=tasksQueued,proto3" json:"tasks_queued,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *Heartbeat) Reset() {
|
||
*x = Heartbeat{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[4]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *Heartbeat) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*Heartbeat) ProtoMessage() {}
|
||
|
||
func (x *Heartbeat) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[4]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use Heartbeat.ProtoReflect.Descriptor instead.
|
||
func (*Heartbeat) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{4}
|
||
}
|
||
|
||
func (x *Heartbeat) GetTs() *timestamppb.Timestamp {
|
||
if x != nil {
|
||
return x.Ts
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *Heartbeat) GetHealth() *AgentHealth {
|
||
if x != nil {
|
||
return x.Health
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *Heartbeat) GetTasksRunning() uint32 {
|
||
if x != nil {
|
||
return x.TasksRunning
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *Heartbeat) GetTasksQueued() uint32 {
|
||
if x != nil {
|
||
return x.TasksQueued
|
||
}
|
||
return 0
|
||
}
|
||
|
||
// Життєвий цикл задачі. Сервер оновлює core.checks.last_run_at/last_error.
|
||
type TaskStatusUpdate struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
CheckId string `protobuf:"bytes,1,opt,name=check_id,json=checkId,proto3" json:"check_id,omitempty"`
|
||
State TaskStatusUpdate_State `protobuf:"varint,2,opt,name=state,proto3,enum=netpulse.v1.TaskStatusUpdate_State" json:"state,omitempty"`
|
||
Ts *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=ts,proto3" json:"ts,omitempty"`
|
||
Error *Error `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *TaskStatusUpdate) Reset() {
|
||
*x = TaskStatusUpdate{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[5]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *TaskStatusUpdate) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*TaskStatusUpdate) ProtoMessage() {}
|
||
|
||
func (x *TaskStatusUpdate) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[5]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use TaskStatusUpdate.ProtoReflect.Descriptor instead.
|
||
func (*TaskStatusUpdate) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{5}
|
||
}
|
||
|
||
func (x *TaskStatusUpdate) GetCheckId() string {
|
||
if x != nil {
|
||
return x.CheckId
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *TaskStatusUpdate) GetState() TaskStatusUpdate_State {
|
||
if x != nil {
|
||
return x.State
|
||
}
|
||
return TaskStatusUpdate_STATE_UNSPECIFIED
|
||
}
|
||
|
||
func (x *TaskStatusUpdate) GetTs() *timestamppb.Timestamp {
|
||
if x != nil {
|
||
return x.Ts
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *TaskStatusUpdate) GetError() *Error {
|
||
if x != nil {
|
||
return x.Error
|
||
}
|
||
return nil
|
||
}
|
||
|
||
type ModuleStatusUpdate struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
ModuleKey string `protobuf:"bytes,1,opt,name=module_key,json=moduleKey,proto3" json:"module_key,omitempty"`
|
||
Active bool `protobuf:"varint,2,opt,name=active,proto3" json:"active,omitempty"`
|
||
Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
|
||
Error *Error `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *ModuleStatusUpdate) Reset() {
|
||
*x = ModuleStatusUpdate{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[6]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *ModuleStatusUpdate) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*ModuleStatusUpdate) ProtoMessage() {}
|
||
|
||
func (x *ModuleStatusUpdate) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[6]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use ModuleStatusUpdate.ProtoReflect.Descriptor instead.
|
||
func (*ModuleStatusUpdate) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{6}
|
||
}
|
||
|
||
func (x *ModuleStatusUpdate) GetModuleKey() string {
|
||
if x != nil {
|
||
return x.ModuleKey
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *ModuleStatusUpdate) GetActive() bool {
|
||
if x != nil {
|
||
return x.Active
|
||
}
|
||
return false
|
||
}
|
||
|
||
func (x *ModuleStatusUpdate) GetVersion() string {
|
||
if x != nil {
|
||
return x.Version
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *ModuleStatusUpdate) GetError() *Error {
|
||
if x != nil {
|
||
return x.Error
|
||
}
|
||
return nil
|
||
}
|
||
|
||
// Агент просить креденшели: або вперше, або бо старі протермінувались.
|
||
type CredentialRequest struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
DeviceIds []string `protobuf:"bytes,1,rep,name=device_ids,json=deviceIds,proto3" json:"device_ids,omitempty"`
|
||
Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` // "expired" | "missing" | "auth_failed"
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *CredentialRequest) Reset() {
|
||
*x = CredentialRequest{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[7]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *CredentialRequest) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*CredentialRequest) ProtoMessage() {}
|
||
|
||
func (x *CredentialRequest) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[7]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use CredentialRequest.ProtoReflect.Descriptor instead.
|
||
func (*CredentialRequest) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{7}
|
||
}
|
||
|
||
func (x *CredentialRequest) GetDeviceIds() []string {
|
||
if x != nil {
|
||
return x.DeviceIds
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *CredentialRequest) GetReason() string {
|
||
if x != nil {
|
||
return x.Reason
|
||
}
|
||
return ""
|
||
}
|
||
|
||
type Pong struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
PingId uint64 `protobuf:"varint,1,opt,name=ping_id,json=pingId,proto3" json:"ping_id,omitempty"`
|
||
AgentTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=agent_time,json=agentTime,proto3" json:"agent_time,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *Pong) Reset() {
|
||
*x = Pong{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[8]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *Pong) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*Pong) ProtoMessage() {}
|
||
|
||
func (x *Pong) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[8]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use Pong.ProtoReflect.Descriptor instead.
|
||
func (*Pong) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{8}
|
||
}
|
||
|
||
func (x *Pong) GetPingId() uint64 {
|
||
if x != nil {
|
||
return x.PingId
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *Pong) GetAgentTime() *timestamppb.Timestamp {
|
||
if x != nil {
|
||
return x.AgentTime
|
||
}
|
||
return nil
|
||
}
|
||
|
||
// Позапланова подія самого зонда (не пристрою).
|
||
type AgentEvent struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
Kind AgentEvent_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=netpulse.v1.AgentEvent_Kind" json:"kind,omitempty"`
|
||
Ts *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=ts,proto3" json:"ts,omitempty"`
|
||
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
|
||
Details map[string]string `protobuf:"bytes,4,rep,name=details,proto3" json:"details,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *AgentEvent) Reset() {
|
||
*x = AgentEvent{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[9]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *AgentEvent) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*AgentEvent) ProtoMessage() {}
|
||
|
||
func (x *AgentEvent) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[9]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use AgentEvent.ProtoReflect.Descriptor instead.
|
||
func (*AgentEvent) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{9}
|
||
}
|
||
|
||
func (x *AgentEvent) GetKind() AgentEvent_Kind {
|
||
if x != nil {
|
||
return x.Kind
|
||
}
|
||
return AgentEvent_KIND_UNSPECIFIED
|
||
}
|
||
|
||
func (x *AgentEvent) GetTs() *timestamppb.Timestamp {
|
||
if x != nil {
|
||
return x.Ts
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *AgentEvent) GetMessage() string {
|
||
if x != nil {
|
||
return x.Message
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *AgentEvent) GetDetails() map[string]string {
|
||
if x != nil {
|
||
return x.Details
|
||
}
|
||
return nil
|
||
}
|
||
|
||
type ControlDown struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"`
|
||
// Types that are valid to be assigned to Payload:
|
||
//
|
||
// *ControlDown_Welcome
|
||
// *ControlDown_TaskPlan
|
||
// *ControlDown_TaskDelta
|
||
// *ControlDown_ModuleControl
|
||
// *ControlDown_Credentials
|
||
// *ControlDown_ConfigJob
|
||
// *ControlDown_ConfigApplyJob
|
||
// *ControlDown_DiscoveryRequest
|
||
// *ControlDown_Ping
|
||
// *ControlDown_Directive
|
||
Payload isControlDown_Payload `protobuf_oneof:"payload"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *ControlDown) Reset() {
|
||
*x = ControlDown{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[10]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *ControlDown) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*ControlDown) ProtoMessage() {}
|
||
|
||
func (x *ControlDown) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[10]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use ControlDown.ProtoReflect.Descriptor instead.
|
||
func (*ControlDown) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{10}
|
||
}
|
||
|
||
func (x *ControlDown) GetSeq() uint64 {
|
||
if x != nil {
|
||
return x.Seq
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *ControlDown) GetPayload() isControlDown_Payload {
|
||
if x != nil {
|
||
return x.Payload
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *ControlDown) GetWelcome() *Welcome {
|
||
if x != nil {
|
||
if x, ok := x.Payload.(*ControlDown_Welcome); ok {
|
||
return x.Welcome
|
||
}
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *ControlDown) GetTaskPlan() *TaskPlan {
|
||
if x != nil {
|
||
if x, ok := x.Payload.(*ControlDown_TaskPlan); ok {
|
||
return x.TaskPlan
|
||
}
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *ControlDown) GetTaskDelta() *TaskDelta {
|
||
if x != nil {
|
||
if x, ok := x.Payload.(*ControlDown_TaskDelta); ok {
|
||
return x.TaskDelta
|
||
}
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *ControlDown) GetModuleControl() *ModuleControl {
|
||
if x != nil {
|
||
if x, ok := x.Payload.(*ControlDown_ModuleControl); ok {
|
||
return x.ModuleControl
|
||
}
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *ControlDown) GetCredentials() *CredentialBundle {
|
||
if x != nil {
|
||
if x, ok := x.Payload.(*ControlDown_Credentials); ok {
|
||
return x.Credentials
|
||
}
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *ControlDown) GetConfigJob() *ConfigJob {
|
||
if x != nil {
|
||
if x, ok := x.Payload.(*ControlDown_ConfigJob); ok {
|
||
return x.ConfigJob
|
||
}
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *ControlDown) GetConfigApplyJob() *ConfigApplyJob {
|
||
if x != nil {
|
||
if x, ok := x.Payload.(*ControlDown_ConfigApplyJob); ok {
|
||
return x.ConfigApplyJob
|
||
}
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *ControlDown) GetDiscoveryRequest() *DiscoveryRequest {
|
||
if x != nil {
|
||
if x, ok := x.Payload.(*ControlDown_DiscoveryRequest); ok {
|
||
return x.DiscoveryRequest
|
||
}
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *ControlDown) GetPing() *Ping {
|
||
if x != nil {
|
||
if x, ok := x.Payload.(*ControlDown_Ping); ok {
|
||
return x.Ping
|
||
}
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *ControlDown) GetDirective() *Directive {
|
||
if x != nil {
|
||
if x, ok := x.Payload.(*ControlDown_Directive); ok {
|
||
return x.Directive
|
||
}
|
||
}
|
||
return nil
|
||
}
|
||
|
||
type isControlDown_Payload interface {
|
||
isControlDown_Payload()
|
||
}
|
||
|
||
type ControlDown_Welcome struct {
|
||
Welcome *Welcome `protobuf:"bytes,2,opt,name=welcome,proto3,oneof"`
|
||
}
|
||
|
||
type ControlDown_TaskPlan struct {
|
||
TaskPlan *TaskPlan `protobuf:"bytes,3,opt,name=task_plan,json=taskPlan,proto3,oneof"`
|
||
}
|
||
|
||
type ControlDown_TaskDelta struct {
|
||
TaskDelta *TaskDelta `protobuf:"bytes,4,opt,name=task_delta,json=taskDelta,proto3,oneof"`
|
||
}
|
||
|
||
type ControlDown_ModuleControl struct {
|
||
ModuleControl *ModuleControl `protobuf:"bytes,5,opt,name=module_control,json=moduleControl,proto3,oneof"`
|
||
}
|
||
|
||
type ControlDown_Credentials struct {
|
||
Credentials *CredentialBundle `protobuf:"bytes,6,opt,name=credentials,proto3,oneof"`
|
||
}
|
||
|
||
type ControlDown_ConfigJob struct {
|
||
ConfigJob *ConfigJob `protobuf:"bytes,7,opt,name=config_job,json=configJob,proto3,oneof"`
|
||
}
|
||
|
||
type ControlDown_ConfigApplyJob struct {
|
||
ConfigApplyJob *ConfigApplyJob `protobuf:"bytes,8,opt,name=config_apply_job,json=configApplyJob,proto3,oneof"`
|
||
}
|
||
|
||
type ControlDown_DiscoveryRequest struct {
|
||
DiscoveryRequest *DiscoveryRequest `protobuf:"bytes,9,opt,name=discovery_request,json=discoveryRequest,proto3,oneof"`
|
||
}
|
||
|
||
type ControlDown_Ping struct {
|
||
Ping *Ping `protobuf:"bytes,10,opt,name=ping,proto3,oneof"`
|
||
}
|
||
|
||
type ControlDown_Directive struct {
|
||
Directive *Directive `protobuf:"bytes,11,opt,name=directive,proto3,oneof"`
|
||
}
|
||
|
||
func (*ControlDown_Welcome) isControlDown_Payload() {}
|
||
|
||
func (*ControlDown_TaskPlan) isControlDown_Payload() {}
|
||
|
||
func (*ControlDown_TaskDelta) isControlDown_Payload() {}
|
||
|
||
func (*ControlDown_ModuleControl) isControlDown_Payload() {}
|
||
|
||
func (*ControlDown_Credentials) isControlDown_Payload() {}
|
||
|
||
func (*ControlDown_ConfigJob) isControlDown_Payload() {}
|
||
|
||
func (*ControlDown_ConfigApplyJob) isControlDown_Payload() {}
|
||
|
||
func (*ControlDown_DiscoveryRequest) isControlDown_Payload() {}
|
||
|
||
func (*ControlDown_Ping) isControlDown_Payload() {}
|
||
|
||
func (*ControlDown_Directive) isControlDown_Payload() {}
|
||
|
||
type Welcome struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
|
||
// Час сервера — агент рахує з нього clock_skew. Мітки часу в
|
||
// телеметрії лишаються агентськими, але сервер знає поправку.
|
||
ServerTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=server_time,json=serverTime,proto3" json:"server_time,omitempty"`
|
||
HeartbeatInterval *durationpb.Duration `protobuf:"bytes,3,opt,name=heartbeat_interval,json=heartbeatInterval,proto3" json:"heartbeat_interval,omitempty"`
|
||
// Параметри батчингу телеметрії. Сервер диктує їх на льоту —
|
||
// так можна пригальмувати балакучого агента без оновлення бінарника.
|
||
TelemetryMaxBatchSize uint32 `protobuf:"varint,4,opt,name=telemetry_max_batch_size,json=telemetryMaxBatchSize,proto3" json:"telemetry_max_batch_size,omitempty"`
|
||
TelemetryMaxBatchInterval *durationpb.Duration `protobuf:"bytes,5,opt,name=telemetry_max_batch_interval,json=telemetryMaxBatchInterval,proto3" json:"telemetry_max_batch_interval,omitempty"`
|
||
TelemetryMaxInFlight uint32 `protobuf:"varint,6,opt,name=telemetry_max_in_flight,json=telemetryMaxInFlight,proto3" json:"telemetry_max_in_flight,omitempty"`
|
||
// Скільки чеків агенту дозволено виконувати паралельно.
|
||
MaxConcurrentChecks uint32 `protobuf:"varint,7,opt,name=max_concurrent_checks,json=maxConcurrentChecks,proto3" json:"max_concurrent_checks,omitempty"`
|
||
// Ліміт ICMP, щоб зонд не виглядав як сканер для IDS клієнта.
|
||
IcmpRatePps uint32 `protobuf:"varint,8,opt,name=icmp_rate_pps,json=icmpRatePps,proto3" json:"icmp_rate_pps,omitempty"`
|
||
// Повний план задач надійде окремим TaskPlan, якщо хеш не збігся.
|
||
TaskPlanFollows bool `protobuf:"varint,9,opt,name=task_plan_follows,json=taskPlanFollows,proto3" json:"task_plan_follows,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *Welcome) Reset() {
|
||
*x = Welcome{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[11]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *Welcome) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*Welcome) ProtoMessage() {}
|
||
|
||
func (x *Welcome) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[11]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use Welcome.ProtoReflect.Descriptor instead.
|
||
func (*Welcome) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{11}
|
||
}
|
||
|
||
func (x *Welcome) GetSessionId() string {
|
||
if x != nil {
|
||
return x.SessionId
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Welcome) GetServerTime() *timestamppb.Timestamp {
|
||
if x != nil {
|
||
return x.ServerTime
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *Welcome) GetHeartbeatInterval() *durationpb.Duration {
|
||
if x != nil {
|
||
return x.HeartbeatInterval
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *Welcome) GetTelemetryMaxBatchSize() uint32 {
|
||
if x != nil {
|
||
return x.TelemetryMaxBatchSize
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *Welcome) GetTelemetryMaxBatchInterval() *durationpb.Duration {
|
||
if x != nil {
|
||
return x.TelemetryMaxBatchInterval
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *Welcome) GetTelemetryMaxInFlight() uint32 {
|
||
if x != nil {
|
||
return x.TelemetryMaxInFlight
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *Welcome) GetMaxConcurrentChecks() uint32 {
|
||
if x != nil {
|
||
return x.MaxConcurrentChecks
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *Welcome) GetIcmpRatePps() uint32 {
|
||
if x != nil {
|
||
return x.IcmpRatePps
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *Welcome) GetTaskPlanFollows() bool {
|
||
if x != nil {
|
||
return x.TaskPlanFollows
|
||
}
|
||
return false
|
||
}
|
||
|
||
// Повна синхронізація: те, що агент має виконувати. Заміщає все.
|
||
type TaskPlan struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
PlanHash []byte `protobuf:"bytes,1,opt,name=plan_hash,json=planHash,proto3" json:"plan_hash,omitempty"`
|
||
Tasks []*Task `protobuf:"bytes,2,rep,name=tasks,proto3" json:"tasks,omitempty"`
|
||
Devices []*DeviceTarget `protobuf:"bytes,3,rep,name=devices,proto3" json:"devices,omitempty"`
|
||
// План може прийти частинами; агент застосовує його атомарно
|
||
// лише після final = true.
|
||
Final bool `protobuf:"varint,4,opt,name=final,proto3" json:"final,omitempty"`
|
||
Part uint32 `protobuf:"varint,5,opt,name=part,proto3" json:"part,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *TaskPlan) Reset() {
|
||
*x = TaskPlan{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[12]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *TaskPlan) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*TaskPlan) ProtoMessage() {}
|
||
|
||
func (x *TaskPlan) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[12]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use TaskPlan.ProtoReflect.Descriptor instead.
|
||
func (*TaskPlan) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{12}
|
||
}
|
||
|
||
func (x *TaskPlan) GetPlanHash() []byte {
|
||
if x != nil {
|
||
return x.PlanHash
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *TaskPlan) GetTasks() []*Task {
|
||
if x != nil {
|
||
return x.Tasks
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *TaskPlan) GetDevices() []*DeviceTarget {
|
||
if x != nil {
|
||
return x.Devices
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *TaskPlan) GetFinal() bool {
|
||
if x != nil {
|
||
return x.Final
|
||
}
|
||
return false
|
||
}
|
||
|
||
func (x *TaskPlan) GetPart() uint32 {
|
||
if x != nil {
|
||
return x.Part
|
||
}
|
||
return 0
|
||
}
|
||
|
||
// Інкрементальна зміна плану — типовий випадок після додавання
|
||
// одного пристрою в UI. Перезаливати 50 000 задач заради цього не треба.
|
||
type TaskDelta struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
PlanHash []byte `protobuf:"bytes,1,opt,name=plan_hash,json=planHash,proto3" json:"plan_hash,omitempty"` // хеш плану ПІСЛЯ застосування дельти
|
||
Upsert []*Task `protobuf:"bytes,2,rep,name=upsert,proto3" json:"upsert,omitempty"`
|
||
RemoveCheckIds []string `protobuf:"bytes,3,rep,name=remove_check_ids,json=removeCheckIds,proto3" json:"remove_check_ids,omitempty"`
|
||
UpsertDevices []*DeviceTarget `protobuf:"bytes,4,rep,name=upsert_devices,json=upsertDevices,proto3" json:"upsert_devices,omitempty"`
|
||
RemoveDeviceIds []string `protobuf:"bytes,5,rep,name=remove_device_ids,json=removeDeviceIds,proto3" json:"remove_device_ids,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *TaskDelta) Reset() {
|
||
*x = TaskDelta{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[13]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *TaskDelta) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*TaskDelta) ProtoMessage() {}
|
||
|
||
func (x *TaskDelta) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[13]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use TaskDelta.ProtoReflect.Descriptor instead.
|
||
func (*TaskDelta) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{13}
|
||
}
|
||
|
||
func (x *TaskDelta) GetPlanHash() []byte {
|
||
if x != nil {
|
||
return x.PlanHash
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *TaskDelta) GetUpsert() []*Task {
|
||
if x != nil {
|
||
return x.Upsert
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *TaskDelta) GetRemoveCheckIds() []string {
|
||
if x != nil {
|
||
return x.RemoveCheckIds
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *TaskDelta) GetUpsertDevices() []*DeviceTarget {
|
||
if x != nil {
|
||
return x.UpsertDevices
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *TaskDelta) GetRemoveDeviceIds() []string {
|
||
if x != nil {
|
||
return x.RemoveDeviceIds
|
||
}
|
||
return nil
|
||
}
|
||
|
||
// Одна задача опитування. Дзеркалить core.checks.
|
||
type Task struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
CheckId string `protobuf:"bytes,1,opt,name=check_id,json=checkId,proto3" json:"check_id,omitempty"`
|
||
DeviceId string `protobuf:"bytes,2,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
|
||
// Заповнюється для чеків рівня інтерфейсу.
|
||
InterfaceId string `protobuf:"bytes,3,opt,name=interface_id,json=interfaceId,proto3" json:"interface_id,omitempty"`
|
||
// "<plugin>.<check>": icmp.ping, snmp.if, http.status, ncm.backup.
|
||
// Модуль-виконавець визначається префіксом до крапки.
|
||
CheckType string `protobuf:"bytes,4,opt,name=check_type,json=checkType,proto3" json:"check_type,omitempty"`
|
||
// Параметри чека — непрозорий для ядра JSON. Валідність гарантує
|
||
// params_schema з core.check_types; розбирає їх сам модуль.
|
||
// Так новий плагін не потребує зміни .proto.
|
||
ParamsJson []byte `protobuf:"bytes,5,opt,name=params_json,json=paramsJson,proto3" json:"params_json,omitempty"`
|
||
Interval *durationpb.Duration `protobuf:"bytes,6,opt,name=interval,proto3" json:"interval,omitempty"`
|
||
Timeout *durationpb.Duration `protobuf:"bytes,7,opt,name=timeout,proto3" json:"timeout,omitempty"`
|
||
Retries uint32 `protobuf:"varint,8,opt,name=retries,proto3" json:"retries,omitempty"`
|
||
Enabled bool `protobuf:"varint,9,opt,name=enabled,proto3" json:"enabled,omitempty"`
|
||
// Зсув у межах інтервалу, щоб 5000 чеків не стартували одночасно.
|
||
// Розраховує сервер — детерміновано від check_id, щоб зберігався
|
||
// між перезапусками.
|
||
ScheduleOffset *durationpb.Duration `protobuf:"bytes,10,opt,name=schedule_offset,json=scheduleOffset,proto3" json:"schedule_offset,omitempty"`
|
||
CredentialId string `protobuf:"bytes,11,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *Task) Reset() {
|
||
*x = Task{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[14]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *Task) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*Task) ProtoMessage() {}
|
||
|
||
func (x *Task) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[14]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use Task.ProtoReflect.Descriptor instead.
|
||
func (*Task) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{14}
|
||
}
|
||
|
||
func (x *Task) GetCheckId() string {
|
||
if x != nil {
|
||
return x.CheckId
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Task) GetDeviceId() string {
|
||
if x != nil {
|
||
return x.DeviceId
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Task) GetInterfaceId() string {
|
||
if x != nil {
|
||
return x.InterfaceId
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Task) GetCheckType() string {
|
||
if x != nil {
|
||
return x.CheckType
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Task) GetParamsJson() []byte {
|
||
if x != nil {
|
||
return x.ParamsJson
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *Task) GetInterval() *durationpb.Duration {
|
||
if x != nil {
|
||
return x.Interval
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *Task) GetTimeout() *durationpb.Duration {
|
||
if x != nil {
|
||
return x.Timeout
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *Task) GetRetries() uint32 {
|
||
if x != nil {
|
||
return x.Retries
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *Task) GetEnabled() bool {
|
||
if x != nil {
|
||
return x.Enabled
|
||
}
|
||
return false
|
||
}
|
||
|
||
func (x *Task) GetScheduleOffset() *durationpb.Duration {
|
||
if x != nil {
|
||
return x.ScheduleOffset
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *Task) GetCredentialId() string {
|
||
if x != nil {
|
||
return x.CredentialId
|
||
}
|
||
return ""
|
||
}
|
||
|
||
// Активація/деактивація модулів на зонді.
|
||
type ModuleControl struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
Modules []*ModuleSpec `protobuf:"bytes,1,rep,name=modules,proto3" json:"modules,omitempty"`
|
||
// Модулі, відсутні в списку, вимкнути.
|
||
Exclusive bool `protobuf:"varint,2,opt,name=exclusive,proto3" json:"exclusive,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *ModuleControl) Reset() {
|
||
*x = ModuleControl{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[15]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *ModuleControl) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*ModuleControl) ProtoMessage() {}
|
||
|
||
func (x *ModuleControl) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[15]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use ModuleControl.ProtoReflect.Descriptor instead.
|
||
func (*ModuleControl) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{15}
|
||
}
|
||
|
||
func (x *ModuleControl) GetModules() []*ModuleSpec {
|
||
if x != nil {
|
||
return x.Modules
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *ModuleControl) GetExclusive() bool {
|
||
if x != nil {
|
||
return x.Exclusive
|
||
}
|
||
return false
|
||
}
|
||
|
||
type ModuleSpec struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // icmp, snmp, topology, ncm, modbus
|
||
Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"`
|
||
MinVersion string `protobuf:"bytes,3,opt,name=min_version,json=minVersion,proto3" json:"min_version,omitempty"`
|
||
// Налаштування модуля (JSON), напр. розмір SNMP-пулу.
|
||
ConfigJson []byte `protobuf:"bytes,4,opt,name=config_json,json=configJson,proto3" json:"config_json,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *ModuleSpec) Reset() {
|
||
*x = ModuleSpec{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[16]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *ModuleSpec) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*ModuleSpec) ProtoMessage() {}
|
||
|
||
func (x *ModuleSpec) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[16]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use ModuleSpec.ProtoReflect.Descriptor instead.
|
||
func (*ModuleSpec) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{16}
|
||
}
|
||
|
||
func (x *ModuleSpec) GetKey() string {
|
||
if x != nil {
|
||
return x.Key
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *ModuleSpec) GetEnabled() bool {
|
||
if x != nil {
|
||
return x.Enabled
|
||
}
|
||
return false
|
||
}
|
||
|
||
func (x *ModuleSpec) GetMinVersion() string {
|
||
if x != nil {
|
||
return x.MinVersion
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *ModuleSpec) GetConfigJson() []byte {
|
||
if x != nil {
|
||
return x.ConfigJson
|
||
}
|
||
return nil
|
||
}
|
||
|
||
type CredentialBundle struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
// device_id → креденшели, які до нього застосовні, за пріоритетом.
|
||
ByDevice map[string]*CredentialList `protobuf:"bytes,1,rep,name=by_device,json=byDevice,proto3" json:"by_device,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||
// Спільний строк придатності комплекту.
|
||
ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *CredentialBundle) Reset() {
|
||
*x = CredentialBundle{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[17]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *CredentialBundle) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*CredentialBundle) ProtoMessage() {}
|
||
|
||
func (x *CredentialBundle) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[17]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use CredentialBundle.ProtoReflect.Descriptor instead.
|
||
func (*CredentialBundle) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{17}
|
||
}
|
||
|
||
func (x *CredentialBundle) GetByDevice() map[string]*CredentialList {
|
||
if x != nil {
|
||
return x.ByDevice
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *CredentialBundle) GetExpiresAt() *timestamppb.Timestamp {
|
||
if x != nil {
|
||
return x.ExpiresAt
|
||
}
|
||
return nil
|
||
}
|
||
|
||
type CredentialList struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
Credentials []*Credential `protobuf:"bytes,1,rep,name=credentials,proto3" json:"credentials,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *CredentialList) Reset() {
|
||
*x = CredentialList{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[18]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *CredentialList) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*CredentialList) ProtoMessage() {}
|
||
|
||
func (x *CredentialList) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[18]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use CredentialList.ProtoReflect.Descriptor instead.
|
||
func (*CredentialList) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{18}
|
||
}
|
||
|
||
func (x *CredentialList) GetCredentials() []*Credential {
|
||
if x != nil {
|
||
return x.Credentials
|
||
}
|
||
return nil
|
||
}
|
||
|
||
type DiscoveryRequest struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"`
|
||
Protocols []DiscoveryProto `protobuf:"varint,2,rep,packed,name=protocols,proto3,enum=netpulse.v1.DiscoveryProto" json:"protocols,omitempty"`
|
||
// Пристрої, які опитати на предмет сусідів.
|
||
DeviceIds []string `protobuf:"bytes,3,rep,name=device_ids,json=deviceIds,proto3" json:"device_ids,omitempty"`
|
||
// Підмережі для сканування (CIDR). Порожньо — не сканувати.
|
||
Subnets []string `protobuf:"bytes,4,rep,name=subnets,proto3" json:"subnets,omitempty"`
|
||
// Обмеження темпу сканування, щоб не збурювати мережу клієнта.
|
||
ScanRatePps uint32 `protobuf:"varint,5,opt,name=scan_rate_pps,json=scanRatePps,proto3" json:"scan_rate_pps,omitempty"`
|
||
Timeout *durationpb.Duration `protobuf:"bytes,6,opt,name=timeout,proto3" json:"timeout,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *DiscoveryRequest) Reset() {
|
||
*x = DiscoveryRequest{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[19]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *DiscoveryRequest) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*DiscoveryRequest) ProtoMessage() {}
|
||
|
||
func (x *DiscoveryRequest) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[19]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use DiscoveryRequest.ProtoReflect.Descriptor instead.
|
||
func (*DiscoveryRequest) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{19}
|
||
}
|
||
|
||
func (x *DiscoveryRequest) GetRunId() string {
|
||
if x != nil {
|
||
return x.RunId
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *DiscoveryRequest) GetProtocols() []DiscoveryProto {
|
||
if x != nil {
|
||
return x.Protocols
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *DiscoveryRequest) GetDeviceIds() []string {
|
||
if x != nil {
|
||
return x.DeviceIds
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *DiscoveryRequest) GetSubnets() []string {
|
||
if x != nil {
|
||
return x.Subnets
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *DiscoveryRequest) GetScanRatePps() uint32 {
|
||
if x != nil {
|
||
return x.ScanRatePps
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *DiscoveryRequest) GetTimeout() *durationpb.Duration {
|
||
if x != nil {
|
||
return x.Timeout
|
||
}
|
||
return nil
|
||
}
|
||
|
||
type Ping struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
PingId uint64 `protobuf:"varint,1,opt,name=ping_id,json=pingId,proto3" json:"ping_id,omitempty"`
|
||
ServerTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=server_time,json=serverTime,proto3" json:"server_time,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *Ping) Reset() {
|
||
*x = Ping{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[20]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *Ping) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*Ping) ProtoMessage() {}
|
||
|
||
func (x *Ping) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[20]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use Ping.ProtoReflect.Descriptor instead.
|
||
func (*Ping) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{20}
|
||
}
|
||
|
||
func (x *Ping) GetPingId() uint64 {
|
||
if x != nil {
|
||
return x.PingId
|
||
}
|
||
return 0
|
||
}
|
||
|
||
func (x *Ping) GetServerTime() *timestamppb.Timestamp {
|
||
if x != nil {
|
||
return x.ServerTime
|
||
}
|
||
return nil
|
||
}
|
||
|
||
// Команди життєвого циклу самого агента.
|
||
type Directive struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
Action Directive_Action `protobuf:"varint,1,opt,name=action,proto3,enum=netpulse.v1.Directive_Action" json:"action,omitempty"`
|
||
Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
|
||
ReconnectAfter *durationpb.Duration `protobuf:"bytes,3,opt,name=reconnect_after,json=reconnectAfter,proto3" json:"reconnect_after,omitempty"`
|
||
NewEndpoint string `protobuf:"bytes,4,opt,name=new_endpoint,json=newEndpoint,proto3" json:"new_endpoint,omitempty"`
|
||
Update *UpdateInfo `protobuf:"bytes,5,opt,name=update,proto3" json:"update,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *Directive) Reset() {
|
||
*x = Directive{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[21]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *Directive) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*Directive) ProtoMessage() {}
|
||
|
||
func (x *Directive) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[21]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use Directive.ProtoReflect.Descriptor instead.
|
||
func (*Directive) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{21}
|
||
}
|
||
|
||
func (x *Directive) GetAction() Directive_Action {
|
||
if x != nil {
|
||
return x.Action
|
||
}
|
||
return Directive_ACTION_UNSPECIFIED
|
||
}
|
||
|
||
func (x *Directive) GetReason() string {
|
||
if x != nil {
|
||
return x.Reason
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Directive) GetReconnectAfter() *durationpb.Duration {
|
||
if x != nil {
|
||
return x.ReconnectAfter
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *Directive) GetNewEndpoint() string {
|
||
if x != nil {
|
||
return x.NewEndpoint
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *Directive) GetUpdate() *UpdateInfo {
|
||
if x != nil {
|
||
return x.Update
|
||
}
|
||
return nil
|
||
}
|
||
|
||
type UpdateInfo struct {
|
||
state protoimpl.MessageState `protogen:"open.v1"`
|
||
Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
|
||
DownloadUrl string `protobuf:"bytes,2,opt,name=download_url,json=downloadUrl,proto3" json:"download_url,omitempty"`
|
||
// sha256 бінарника — агент зобов'язаний звірити перед запуском.
|
||
Sha256 []byte `protobuf:"bytes,3,opt,name=sha256,proto3" json:"sha256,omitempty"`
|
||
// Підпис постачальника (Ed25519) над sha256. Без валідного підпису
|
||
// оновлення не застосовується: інакше компрометація CDN
|
||
// перетворюється на RCE в мережі кожного клієнта.
|
||
Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
|
||
Mandatory bool `protobuf:"varint,5,opt,name=mandatory,proto3" json:"mandatory,omitempty"`
|
||
unknownFields protoimpl.UnknownFields
|
||
sizeCache protoimpl.SizeCache
|
||
}
|
||
|
||
func (x *UpdateInfo) Reset() {
|
||
*x = UpdateInfo{}
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[22]
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
|
||
func (x *UpdateInfo) String() string {
|
||
return protoimpl.X.MessageStringOf(x)
|
||
}
|
||
|
||
func (*UpdateInfo) ProtoMessage() {}
|
||
|
||
func (x *UpdateInfo) ProtoReflect() protoreflect.Message {
|
||
mi := &file_netpulse_v1_agent_proto_msgTypes[22]
|
||
if x != nil {
|
||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||
if ms.LoadMessageInfo() == nil {
|
||
ms.StoreMessageInfo(mi)
|
||
}
|
||
return ms
|
||
}
|
||
return mi.MessageOf(x)
|
||
}
|
||
|
||
// Deprecated: Use UpdateInfo.ProtoReflect.Descriptor instead.
|
||
func (*UpdateInfo) Descriptor() ([]byte, []int) {
|
||
return file_netpulse_v1_agent_proto_rawDescGZIP(), []int{22}
|
||
}
|
||
|
||
func (x *UpdateInfo) GetVersion() string {
|
||
if x != nil {
|
||
return x.Version
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *UpdateInfo) GetDownloadUrl() string {
|
||
if x != nil {
|
||
return x.DownloadUrl
|
||
}
|
||
return ""
|
||
}
|
||
|
||
func (x *UpdateInfo) GetSha256() []byte {
|
||
if x != nil {
|
||
return x.Sha256
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *UpdateInfo) GetSignature() []byte {
|
||
if x != nil {
|
||
return x.Signature
|
||
}
|
||
return nil
|
||
}
|
||
|
||
func (x *UpdateInfo) GetMandatory() bool {
|
||
if x != nil {
|
||
return x.Mandatory
|
||
}
|
||
return false
|
||
}
|
||
|
||
var File_netpulse_v1_agent_proto protoreflect.FileDescriptor
|
||
|
||
const file_netpulse_v1_agent_proto_rawDesc = "" +
|
||
"\n" +
|
||
"\x17netpulse/v1/agent.proto\x12\vnetpulse.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x18netpulse/v1/common.proto\x1a\x1bnetpulse/v1/discovery.proto\x1a\x16netpulse/v1/logs.proto\x1a\x15netpulse/v1/ncm.proto\x1a\x1bnetpulse/v1/telemetry.proto\"\xbe\x01\n" +
|
||
"\rEnrollRequest\x12)\n" +
|
||
"\x10enrollment_token\x18\x01 \x01(\tR\x0fenrollmentToken\x12\x10\n" +
|
||
"\x03csr\x18\x02 \x01(\fR\x03csr\x12\x1a\n" +
|
||
"\bhostname\x18\x03 \x01(\tR\bhostname\x12-\n" +
|
||
"\x05build\x18\x04 \x01(\v2\x17.netpulse.v1.AgentBuildR\x05build\x12%\n" +
|
||
"\x0erequested_name\x18\x05 \x01(\tR\rrequestedName\"\xa5\x02\n" +
|
||
"\x0eEnrollResponse\x12\x19\n" +
|
||
"\bagent_id\x18\x01 \x01(\tR\aagentId\x12\x1d\n" +
|
||
"\n" +
|
||
"agent_name\x18\x02 \x01(\tR\tagentName\x12 \n" +
|
||
"\vcertificate\x18\x03 \x01(\fR\vcertificate\x12\x19\n" +
|
||
"\bca_chain\x18\x04 \x01(\fR\acaChain\x12P\n" +
|
||
"\x16certificate_expires_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\x14certificateExpiresAt\x12)\n" +
|
||
"\x10control_endpoint\x18\x06 \x01(\tR\x0fcontrolEndpoint\x12\x1f\n" +
|
||
"\vagent_token\x18\a \x01(\tR\n" +
|
||
"agentToken\"\x93\x04\n" +
|
||
"\tControlUp\x12\x10\n" +
|
||
"\x03seq\x18\x01 \x01(\x04R\x03seq\x12*\n" +
|
||
"\x05hello\x18\x02 \x01(\v2\x12.netpulse.v1.HelloH\x00R\x05hello\x126\n" +
|
||
"\theartbeat\x18\x03 \x01(\v2\x16.netpulse.v1.HeartbeatH\x00R\theartbeat\x12@\n" +
|
||
"\vtask_status\x18\x04 \x01(\v2\x1d.netpulse.v1.TaskStatusUpdateH\x00R\n" +
|
||
"taskStatus\x12F\n" +
|
||
"\rmodule_status\x18\x05 \x01(\v2\x1f.netpulse.v1.ModuleStatusUpdateH\x00R\fmoduleStatus\x12P\n" +
|
||
"\x13config_apply_result\x18\x06 \x01(\v2\x1e.netpulse.v1.ConfigApplyResultH\x00R\x11configApplyResult\x12O\n" +
|
||
"\x12credential_request\x18\a \x01(\v2\x1e.netpulse.v1.CredentialRequestH\x00R\x11credentialRequest\x12'\n" +
|
||
"\x04pong\x18\b \x01(\v2\x11.netpulse.v1.PongH\x00R\x04pong\x12/\n" +
|
||
"\x05event\x18\t \x01(\v2\x17.netpulse.v1.AgentEventH\x00R\x05eventB\t\n" +
|
||
"\apayload\"\xa6\x02\n" +
|
||
"\x05Hello\x12\x19\n" +
|
||
"\bagent_id\x18\x01 \x01(\tR\aagentId\x12-\n" +
|
||
"\x05build\x18\x02 \x01(\v2\x17.netpulse.v1.AgentBuildR\x05build\x12\x1a\n" +
|
||
"\bhostname\x18\x03 \x01(\tR\bhostname\x12'\n" +
|
||
"\x0flocal_addresses\x18\x04 \x03(\tR\x0elocalAddresses\x129\n" +
|
||
"\n" +
|
||
"started_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tstartedAt\x12$\n" +
|
||
"\x0etask_plan_hash\x18\x06 \x01(\fR\ftaskPlanHash\x12-\n" +
|
||
"\x13last_acked_batch_id\x18\a \x01(\x04R\x10lastAckedBatchId\"\xb1\x01\n" +
|
||
"\tHeartbeat\x12*\n" +
|
||
"\x02ts\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x02ts\x120\n" +
|
||
"\x06health\x18\x02 \x01(\v2\x18.netpulse.v1.AgentHealthR\x06health\x12#\n" +
|
||
"\rtasks_running\x18\x03 \x01(\rR\ftasksRunning\x12!\n" +
|
||
"\ftasks_queued\x18\x04 \x01(\rR\vtasksQueued\"\xd4\x02\n" +
|
||
"\x10TaskStatusUpdate\x12\x19\n" +
|
||
"\bcheck_id\x18\x01 \x01(\tR\acheckId\x129\n" +
|
||
"\x05state\x18\x02 \x01(\x0e2#.netpulse.v1.TaskStatusUpdate.StateR\x05state\x12*\n" +
|
||
"\x02ts\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x02ts\x12(\n" +
|
||
"\x05error\x18\x04 \x01(\v2\x12.netpulse.v1.ErrorR\x05error\"\x93\x01\n" +
|
||
"\x05State\x12\x15\n" +
|
||
"\x11STATE_UNSPECIFIED\x10\x00\x12\x12\n" +
|
||
"\x0eSTATE_ACCEPTED\x10\x01\x12\x11\n" +
|
||
"\rSTATE_RUNNING\x10\x02\x12\x13\n" +
|
||
"\x0fSTATE_SUCCEEDED\x10\x03\x12\x10\n" +
|
||
"\fSTATE_FAILED\x10\x04\x12\x11\n" +
|
||
"\rSTATE_SKIPPED\x10\x05\x12\x12\n" +
|
||
"\x0eSTATE_REJECTED\x10\x06\"\x8f\x01\n" +
|
||
"\x12ModuleStatusUpdate\x12\x1d\n" +
|
||
"\n" +
|
||
"module_key\x18\x01 \x01(\tR\tmoduleKey\x12\x16\n" +
|
||
"\x06active\x18\x02 \x01(\bR\x06active\x12\x18\n" +
|
||
"\aversion\x18\x03 \x01(\tR\aversion\x12(\n" +
|
||
"\x05error\x18\x04 \x01(\v2\x12.netpulse.v1.ErrorR\x05error\"J\n" +
|
||
"\x11CredentialRequest\x12\x1d\n" +
|
||
"\n" +
|
||
"device_ids\x18\x01 \x03(\tR\tdeviceIds\x12\x16\n" +
|
||
"\x06reason\x18\x02 \x01(\tR\x06reason\"Z\n" +
|
||
"\x04Pong\x12\x17\n" +
|
||
"\aping_id\x18\x01 \x01(\x04R\x06pingId\x129\n" +
|
||
"\n" +
|
||
"agent_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\tagentTime\"\xbd\x03\n" +
|
||
"\n" +
|
||
"AgentEvent\x120\n" +
|
||
"\x04kind\x18\x01 \x01(\x0e2\x1c.netpulse.v1.AgentEvent.KindR\x04kind\x12*\n" +
|
||
"\x02ts\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x02ts\x12\x18\n" +
|
||
"\amessage\x18\x03 \x01(\tR\amessage\x12>\n" +
|
||
"\adetails\x18\x04 \x03(\v2$.netpulse.v1.AgentEvent.DetailsEntryR\adetails\x1a:\n" +
|
||
"\fDetailsEntry\x12\x10\n" +
|
||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xba\x01\n" +
|
||
"\x04Kind\x12\x14\n" +
|
||
"\x10KIND_UNSPECIFIED\x10\x00\x12\x10\n" +
|
||
"\fKIND_STARTED\x10\x01\x12\x11\n" +
|
||
"\rKIND_STOPPING\x10\x02\x12\x15\n" +
|
||
"\x11KIND_MODULE_CRASH\x10\x03\x12\x18\n" +
|
||
"\x14KIND_BUFFER_OVERFLOW\x10\x04\x12\x13\n" +
|
||
"\x0fKIND_CLOCK_JUMP\x10\x05\x12\x17\n" +
|
||
"\x13KIND_UPDATE_APPLIED\x10\x06\x12\x18\n" +
|
||
"\x14KIND_CONFIG_REJECTED\x10\a\"\x84\x05\n" +
|
||
"\vControlDown\x12\x10\n" +
|
||
"\x03seq\x18\x01 \x01(\x04R\x03seq\x120\n" +
|
||
"\awelcome\x18\x02 \x01(\v2\x14.netpulse.v1.WelcomeH\x00R\awelcome\x124\n" +
|
||
"\ttask_plan\x18\x03 \x01(\v2\x15.netpulse.v1.TaskPlanH\x00R\btaskPlan\x127\n" +
|
||
"\n" +
|
||
"task_delta\x18\x04 \x01(\v2\x16.netpulse.v1.TaskDeltaH\x00R\ttaskDelta\x12C\n" +
|
||
"\x0emodule_control\x18\x05 \x01(\v2\x1a.netpulse.v1.ModuleControlH\x00R\rmoduleControl\x12A\n" +
|
||
"\vcredentials\x18\x06 \x01(\v2\x1d.netpulse.v1.CredentialBundleH\x00R\vcredentials\x127\n" +
|
||
"\n" +
|
||
"config_job\x18\a \x01(\v2\x16.netpulse.v1.ConfigJobH\x00R\tconfigJob\x12G\n" +
|
||
"\x10config_apply_job\x18\b \x01(\v2\x1b.netpulse.v1.ConfigApplyJobH\x00R\x0econfigApplyJob\x12L\n" +
|
||
"\x11discovery_request\x18\t \x01(\v2\x1d.netpulse.v1.DiscoveryRequestH\x00R\x10discoveryRequest\x12'\n" +
|
||
"\x04ping\x18\n" +
|
||
" \x01(\v2\x11.netpulse.v1.PingH\x00R\x04ping\x126\n" +
|
||
"\tdirective\x18\v \x01(\v2\x16.netpulse.v1.DirectiveH\x00R\tdirectiveB\t\n" +
|
||
"\apayload\"\xff\x03\n" +
|
||
"\aWelcome\x12\x1d\n" +
|
||
"\n" +
|
||
"session_id\x18\x01 \x01(\tR\tsessionId\x12;\n" +
|
||
"\vserver_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\n" +
|
||
"serverTime\x12H\n" +
|
||
"\x12heartbeat_interval\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\x11heartbeatInterval\x127\n" +
|
||
"\x18telemetry_max_batch_size\x18\x04 \x01(\rR\x15telemetryMaxBatchSize\x12Z\n" +
|
||
"\x1ctelemetry_max_batch_interval\x18\x05 \x01(\v2\x19.google.protobuf.DurationR\x19telemetryMaxBatchInterval\x125\n" +
|
||
"\x17telemetry_max_in_flight\x18\x06 \x01(\rR\x14telemetryMaxInFlight\x122\n" +
|
||
"\x15max_concurrent_checks\x18\a \x01(\rR\x13maxConcurrentChecks\x12\"\n" +
|
||
"\ricmp_rate_pps\x18\b \x01(\rR\vicmpRatePps\x12*\n" +
|
||
"\x11task_plan_follows\x18\t \x01(\bR\x0ftaskPlanFollows\"\xaf\x01\n" +
|
||
"\bTaskPlan\x12\x1b\n" +
|
||
"\tplan_hash\x18\x01 \x01(\fR\bplanHash\x12'\n" +
|
||
"\x05tasks\x18\x02 \x03(\v2\x11.netpulse.v1.TaskR\x05tasks\x123\n" +
|
||
"\adevices\x18\x03 \x03(\v2\x19.netpulse.v1.DeviceTargetR\adevices\x12\x14\n" +
|
||
"\x05final\x18\x04 \x01(\bR\x05final\x12\x12\n" +
|
||
"\x04part\x18\x05 \x01(\rR\x04part\"\xeb\x01\n" +
|
||
"\tTaskDelta\x12\x1b\n" +
|
||
"\tplan_hash\x18\x01 \x01(\fR\bplanHash\x12)\n" +
|
||
"\x06upsert\x18\x02 \x03(\v2\x11.netpulse.v1.TaskR\x06upsert\x12(\n" +
|
||
"\x10remove_check_ids\x18\x03 \x03(\tR\x0eremoveCheckIds\x12@\n" +
|
||
"\x0eupsert_devices\x18\x04 \x03(\v2\x19.netpulse.v1.DeviceTargetR\rupsertDevices\x12*\n" +
|
||
"\x11remove_device_ids\x18\x05 \x03(\tR\x0fremoveDeviceIds\"\xaa\x03\n" +
|
||
"\x04Task\x12\x19\n" +
|
||
"\bcheck_id\x18\x01 \x01(\tR\acheckId\x12\x1b\n" +
|
||
"\tdevice_id\x18\x02 \x01(\tR\bdeviceId\x12!\n" +
|
||
"\finterface_id\x18\x03 \x01(\tR\vinterfaceId\x12\x1d\n" +
|
||
"\n" +
|
||
"check_type\x18\x04 \x01(\tR\tcheckType\x12\x1f\n" +
|
||
"\vparams_json\x18\x05 \x01(\fR\n" +
|
||
"paramsJson\x125\n" +
|
||
"\binterval\x18\x06 \x01(\v2\x19.google.protobuf.DurationR\binterval\x123\n" +
|
||
"\atimeout\x18\a \x01(\v2\x19.google.protobuf.DurationR\atimeout\x12\x18\n" +
|
||
"\aretries\x18\b \x01(\rR\aretries\x12\x18\n" +
|
||
"\aenabled\x18\t \x01(\bR\aenabled\x12B\n" +
|
||
"\x0fschedule_offset\x18\n" +
|
||
" \x01(\v2\x19.google.protobuf.DurationR\x0escheduleOffset\x12#\n" +
|
||
"\rcredential_id\x18\v \x01(\tR\fcredentialId\"`\n" +
|
||
"\rModuleControl\x121\n" +
|
||
"\amodules\x18\x01 \x03(\v2\x17.netpulse.v1.ModuleSpecR\amodules\x12\x1c\n" +
|
||
"\texclusive\x18\x02 \x01(\bR\texclusive\"z\n" +
|
||
"\n" +
|
||
"ModuleSpec\x12\x10\n" +
|
||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x18\n" +
|
||
"\aenabled\x18\x02 \x01(\bR\aenabled\x12\x1f\n" +
|
||
"\vmin_version\x18\x03 \x01(\tR\n" +
|
||
"minVersion\x12\x1f\n" +
|
||
"\vconfig_json\x18\x04 \x01(\fR\n" +
|
||
"configJson\"\xf1\x01\n" +
|
||
"\x10CredentialBundle\x12H\n" +
|
||
"\tby_device\x18\x01 \x03(\v2+.netpulse.v1.CredentialBundle.ByDeviceEntryR\bbyDevice\x129\n" +
|
||
"\n" +
|
||
"expires_at\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\texpiresAt\x1aX\n" +
|
||
"\rByDeviceEntry\x12\x10\n" +
|
||
"\x03key\x18\x01 \x01(\tR\x03key\x121\n" +
|
||
"\x05value\x18\x02 \x01(\v2\x1b.netpulse.v1.CredentialListR\x05value:\x028\x01\"K\n" +
|
||
"\x0eCredentialList\x129\n" +
|
||
"\vcredentials\x18\x01 \x03(\v2\x17.netpulse.v1.CredentialR\vcredentials\"\xf6\x01\n" +
|
||
"\x10DiscoveryRequest\x12\x15\n" +
|
||
"\x06run_id\x18\x01 \x01(\tR\x05runId\x129\n" +
|
||
"\tprotocols\x18\x02 \x03(\x0e2\x1b.netpulse.v1.DiscoveryProtoR\tprotocols\x12\x1d\n" +
|
||
"\n" +
|
||
"device_ids\x18\x03 \x03(\tR\tdeviceIds\x12\x18\n" +
|
||
"\asubnets\x18\x04 \x03(\tR\asubnets\x12\"\n" +
|
||
"\rscan_rate_pps\x18\x05 \x01(\rR\vscanRatePps\x123\n" +
|
||
"\atimeout\x18\x06 \x01(\v2\x19.google.protobuf.DurationR\atimeout\"\\\n" +
|
||
"\x04Ping\x12\x17\n" +
|
||
"\aping_id\x18\x01 \x01(\x04R\x06pingId\x12;\n" +
|
||
"\vserver_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\n" +
|
||
"serverTime\"\xa7\x03\n" +
|
||
"\tDirective\x125\n" +
|
||
"\x06action\x18\x01 \x01(\x0e2\x1d.netpulse.v1.Directive.ActionR\x06action\x12\x16\n" +
|
||
"\x06reason\x18\x02 \x01(\tR\x06reason\x12B\n" +
|
||
"\x0freconnect_after\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\x0ereconnectAfter\x12!\n" +
|
||
"\fnew_endpoint\x18\x04 \x01(\tR\vnewEndpoint\x12/\n" +
|
||
"\x06update\x18\x05 \x01(\v2\x17.netpulse.v1.UpdateInfoR\x06update\"\xb2\x01\n" +
|
||
"\x06Action\x12\x16\n" +
|
||
"\x12ACTION_UNSPECIFIED\x10\x00\x12\x11\n" +
|
||
"\rACTION_RELOAD\x10\x01\x12\x10\n" +
|
||
"\fACTION_DRAIN\x10\x02\x12\x10\n" +
|
||
"\fACTION_PAUSE\x10\x03\x12\x11\n" +
|
||
"\rACTION_RESUME\x10\x04\x12\x11\n" +
|
||
"\rACTION_UPDATE\x10\x05\x12\x14\n" +
|
||
"\x10ACTION_RECONNECT\x10\x06\x12\x1d\n" +
|
||
"\x19ACTION_RESET_SERIES_TABLE\x10\a\"\x9d\x01\n" +
|
||
"\n" +
|
||
"UpdateInfo\x12\x18\n" +
|
||
"\aversion\x18\x01 \x01(\tR\aversion\x12!\n" +
|
||
"\fdownload_url\x18\x02 \x01(\tR\vdownloadUrl\x12\x16\n" +
|
||
"\x06sha256\x18\x03 \x01(\fR\x06sha256\x12\x1c\n" +
|
||
"\tsignature\x18\x04 \x01(\fR\tsignature\x12\x1c\n" +
|
||
"\tmandatory\x18\x05 \x01(\bR\tmandatory2V\n" +
|
||
"\x11EnrollmentService\x12A\n" +
|
||
"\x06Enroll\x12\x1a.netpulse.v1.EnrollRequest\x1a\x1b.netpulse.v1.EnrollResponse2\xf1\x02\n" +
|
||
"\fAgentService\x12?\n" +
|
||
"\aControl\x12\x16.netpulse.v1.ControlUp\x1a\x18.netpulse.v1.ControlDown(\x010\x01\x12M\n" +
|
||
"\x0fStreamTelemetry\x12\x1b.netpulse.v1.TelemetryBatch\x1a\x19.netpulse.v1.TelemetryAck(\x010\x01\x12<\n" +
|
||
"\n" +
|
||
"StreamLogs\x12\x15.netpulse.v1.LogBatch\x1a\x13.netpulse.v1.LogAck(\x010\x01\x12J\n" +
|
||
"\x0fReportDiscovery\x12\x1c.netpulse.v1.DiscoveryReport\x1a\x19.netpulse.v1.DiscoveryAck\x12G\n" +
|
||
"\fUploadConfig\x12\x19.netpulse.v1.ConfigUpload\x1a\x1a.netpulse.v1.ConfigReceipt(\x01B\xa6\x01\n" +
|
||
"\x0fcom.netpulse.v1B\n" +
|
||
"AgentProtoP\x01Z:github.com/netpulse/netpulse/gen/go/netpulse/v1;netpulsev1\xa2\x02\x03NXX\xaa\x02\vNetpulse.V1\xca\x02\vNetpulse\\V1\xe2\x02\x17Netpulse\\V1\\GPBMetadata\xea\x02\fNetpulse::V1b\x06proto3"
|
||
|
||
var (
|
||
file_netpulse_v1_agent_proto_rawDescOnce sync.Once
|
||
file_netpulse_v1_agent_proto_rawDescData []byte
|
||
)
|
||
|
||
func file_netpulse_v1_agent_proto_rawDescGZIP() []byte {
|
||
file_netpulse_v1_agent_proto_rawDescOnce.Do(func() {
|
||
file_netpulse_v1_agent_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_netpulse_v1_agent_proto_rawDesc), len(file_netpulse_v1_agent_proto_rawDesc)))
|
||
})
|
||
return file_netpulse_v1_agent_proto_rawDescData
|
||
}
|
||
|
||
var file_netpulse_v1_agent_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
|
||
var file_netpulse_v1_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 25)
|
||
var file_netpulse_v1_agent_proto_goTypes = []any{
|
||
(TaskStatusUpdate_State)(0), // 0: netpulse.v1.TaskStatusUpdate.State
|
||
(AgentEvent_Kind)(0), // 1: netpulse.v1.AgentEvent.Kind
|
||
(Directive_Action)(0), // 2: netpulse.v1.Directive.Action
|
||
(*EnrollRequest)(nil), // 3: netpulse.v1.EnrollRequest
|
||
(*EnrollResponse)(nil), // 4: netpulse.v1.EnrollResponse
|
||
(*ControlUp)(nil), // 5: netpulse.v1.ControlUp
|
||
(*Hello)(nil), // 6: netpulse.v1.Hello
|
||
(*Heartbeat)(nil), // 7: netpulse.v1.Heartbeat
|
||
(*TaskStatusUpdate)(nil), // 8: netpulse.v1.TaskStatusUpdate
|
||
(*ModuleStatusUpdate)(nil), // 9: netpulse.v1.ModuleStatusUpdate
|
||
(*CredentialRequest)(nil), // 10: netpulse.v1.CredentialRequest
|
||
(*Pong)(nil), // 11: netpulse.v1.Pong
|
||
(*AgentEvent)(nil), // 12: netpulse.v1.AgentEvent
|
||
(*ControlDown)(nil), // 13: netpulse.v1.ControlDown
|
||
(*Welcome)(nil), // 14: netpulse.v1.Welcome
|
||
(*TaskPlan)(nil), // 15: netpulse.v1.TaskPlan
|
||
(*TaskDelta)(nil), // 16: netpulse.v1.TaskDelta
|
||
(*Task)(nil), // 17: netpulse.v1.Task
|
||
(*ModuleControl)(nil), // 18: netpulse.v1.ModuleControl
|
||
(*ModuleSpec)(nil), // 19: netpulse.v1.ModuleSpec
|
||
(*CredentialBundle)(nil), // 20: netpulse.v1.CredentialBundle
|
||
(*CredentialList)(nil), // 21: netpulse.v1.CredentialList
|
||
(*DiscoveryRequest)(nil), // 22: netpulse.v1.DiscoveryRequest
|
||
(*Ping)(nil), // 23: netpulse.v1.Ping
|
||
(*Directive)(nil), // 24: netpulse.v1.Directive
|
||
(*UpdateInfo)(nil), // 25: netpulse.v1.UpdateInfo
|
||
nil, // 26: netpulse.v1.AgentEvent.DetailsEntry
|
||
nil, // 27: netpulse.v1.CredentialBundle.ByDeviceEntry
|
||
(*AgentBuild)(nil), // 28: netpulse.v1.AgentBuild
|
||
(*timestamppb.Timestamp)(nil), // 29: google.protobuf.Timestamp
|
||
(*ConfigApplyResult)(nil), // 30: netpulse.v1.ConfigApplyResult
|
||
(*AgentHealth)(nil), // 31: netpulse.v1.AgentHealth
|
||
(*Error)(nil), // 32: netpulse.v1.Error
|
||
(*ConfigJob)(nil), // 33: netpulse.v1.ConfigJob
|
||
(*ConfigApplyJob)(nil), // 34: netpulse.v1.ConfigApplyJob
|
||
(*durationpb.Duration)(nil), // 35: google.protobuf.Duration
|
||
(*DeviceTarget)(nil), // 36: netpulse.v1.DeviceTarget
|
||
(*Credential)(nil), // 37: netpulse.v1.Credential
|
||
(DiscoveryProto)(0), // 38: netpulse.v1.DiscoveryProto
|
||
(*TelemetryBatch)(nil), // 39: netpulse.v1.TelemetryBatch
|
||
(*LogBatch)(nil), // 40: netpulse.v1.LogBatch
|
||
(*DiscoveryReport)(nil), // 41: netpulse.v1.DiscoveryReport
|
||
(*ConfigUpload)(nil), // 42: netpulse.v1.ConfigUpload
|
||
(*TelemetryAck)(nil), // 43: netpulse.v1.TelemetryAck
|
||
(*LogAck)(nil), // 44: netpulse.v1.LogAck
|
||
(*DiscoveryAck)(nil), // 45: netpulse.v1.DiscoveryAck
|
||
(*ConfigReceipt)(nil), // 46: netpulse.v1.ConfigReceipt
|
||
}
|
||
var file_netpulse_v1_agent_proto_depIdxs = []int32{
|
||
28, // 0: netpulse.v1.EnrollRequest.build:type_name -> netpulse.v1.AgentBuild
|
||
29, // 1: netpulse.v1.EnrollResponse.certificate_expires_at:type_name -> google.protobuf.Timestamp
|
||
6, // 2: netpulse.v1.ControlUp.hello:type_name -> netpulse.v1.Hello
|
||
7, // 3: netpulse.v1.ControlUp.heartbeat:type_name -> netpulse.v1.Heartbeat
|
||
8, // 4: netpulse.v1.ControlUp.task_status:type_name -> netpulse.v1.TaskStatusUpdate
|
||
9, // 5: netpulse.v1.ControlUp.module_status:type_name -> netpulse.v1.ModuleStatusUpdate
|
||
30, // 6: netpulse.v1.ControlUp.config_apply_result:type_name -> netpulse.v1.ConfigApplyResult
|
||
10, // 7: netpulse.v1.ControlUp.credential_request:type_name -> netpulse.v1.CredentialRequest
|
||
11, // 8: netpulse.v1.ControlUp.pong:type_name -> netpulse.v1.Pong
|
||
12, // 9: netpulse.v1.ControlUp.event:type_name -> netpulse.v1.AgentEvent
|
||
28, // 10: netpulse.v1.Hello.build:type_name -> netpulse.v1.AgentBuild
|
||
29, // 11: netpulse.v1.Hello.started_at:type_name -> google.protobuf.Timestamp
|
||
29, // 12: netpulse.v1.Heartbeat.ts:type_name -> google.protobuf.Timestamp
|
||
31, // 13: netpulse.v1.Heartbeat.health:type_name -> netpulse.v1.AgentHealth
|
||
0, // 14: netpulse.v1.TaskStatusUpdate.state:type_name -> netpulse.v1.TaskStatusUpdate.State
|
||
29, // 15: netpulse.v1.TaskStatusUpdate.ts:type_name -> google.protobuf.Timestamp
|
||
32, // 16: netpulse.v1.TaskStatusUpdate.error:type_name -> netpulse.v1.Error
|
||
32, // 17: netpulse.v1.ModuleStatusUpdate.error:type_name -> netpulse.v1.Error
|
||
29, // 18: netpulse.v1.Pong.agent_time:type_name -> google.protobuf.Timestamp
|
||
1, // 19: netpulse.v1.AgentEvent.kind:type_name -> netpulse.v1.AgentEvent.Kind
|
||
29, // 20: netpulse.v1.AgentEvent.ts:type_name -> google.protobuf.Timestamp
|
||
26, // 21: netpulse.v1.AgentEvent.details:type_name -> netpulse.v1.AgentEvent.DetailsEntry
|
||
14, // 22: netpulse.v1.ControlDown.welcome:type_name -> netpulse.v1.Welcome
|
||
15, // 23: netpulse.v1.ControlDown.task_plan:type_name -> netpulse.v1.TaskPlan
|
||
16, // 24: netpulse.v1.ControlDown.task_delta:type_name -> netpulse.v1.TaskDelta
|
||
18, // 25: netpulse.v1.ControlDown.module_control:type_name -> netpulse.v1.ModuleControl
|
||
20, // 26: netpulse.v1.ControlDown.credentials:type_name -> netpulse.v1.CredentialBundle
|
||
33, // 27: netpulse.v1.ControlDown.config_job:type_name -> netpulse.v1.ConfigJob
|
||
34, // 28: netpulse.v1.ControlDown.config_apply_job:type_name -> netpulse.v1.ConfigApplyJob
|
||
22, // 29: netpulse.v1.ControlDown.discovery_request:type_name -> netpulse.v1.DiscoveryRequest
|
||
23, // 30: netpulse.v1.ControlDown.ping:type_name -> netpulse.v1.Ping
|
||
24, // 31: netpulse.v1.ControlDown.directive:type_name -> netpulse.v1.Directive
|
||
29, // 32: netpulse.v1.Welcome.server_time:type_name -> google.protobuf.Timestamp
|
||
35, // 33: netpulse.v1.Welcome.heartbeat_interval:type_name -> google.protobuf.Duration
|
||
35, // 34: netpulse.v1.Welcome.telemetry_max_batch_interval:type_name -> google.protobuf.Duration
|
||
17, // 35: netpulse.v1.TaskPlan.tasks:type_name -> netpulse.v1.Task
|
||
36, // 36: netpulse.v1.TaskPlan.devices:type_name -> netpulse.v1.DeviceTarget
|
||
17, // 37: netpulse.v1.TaskDelta.upsert:type_name -> netpulse.v1.Task
|
||
36, // 38: netpulse.v1.TaskDelta.upsert_devices:type_name -> netpulse.v1.DeviceTarget
|
||
35, // 39: netpulse.v1.Task.interval:type_name -> google.protobuf.Duration
|
||
35, // 40: netpulse.v1.Task.timeout:type_name -> google.protobuf.Duration
|
||
35, // 41: netpulse.v1.Task.schedule_offset:type_name -> google.protobuf.Duration
|
||
19, // 42: netpulse.v1.ModuleControl.modules:type_name -> netpulse.v1.ModuleSpec
|
||
27, // 43: netpulse.v1.CredentialBundle.by_device:type_name -> netpulse.v1.CredentialBundle.ByDeviceEntry
|
||
29, // 44: netpulse.v1.CredentialBundle.expires_at:type_name -> google.protobuf.Timestamp
|
||
37, // 45: netpulse.v1.CredentialList.credentials:type_name -> netpulse.v1.Credential
|
||
38, // 46: netpulse.v1.DiscoveryRequest.protocols:type_name -> netpulse.v1.DiscoveryProto
|
||
35, // 47: netpulse.v1.DiscoveryRequest.timeout:type_name -> google.protobuf.Duration
|
||
29, // 48: netpulse.v1.Ping.server_time:type_name -> google.protobuf.Timestamp
|
||
2, // 49: netpulse.v1.Directive.action:type_name -> netpulse.v1.Directive.Action
|
||
35, // 50: netpulse.v1.Directive.reconnect_after:type_name -> google.protobuf.Duration
|
||
25, // 51: netpulse.v1.Directive.update:type_name -> netpulse.v1.UpdateInfo
|
||
21, // 52: netpulse.v1.CredentialBundle.ByDeviceEntry.value:type_name -> netpulse.v1.CredentialList
|
||
3, // 53: netpulse.v1.EnrollmentService.Enroll:input_type -> netpulse.v1.EnrollRequest
|
||
5, // 54: netpulse.v1.AgentService.Control:input_type -> netpulse.v1.ControlUp
|
||
39, // 55: netpulse.v1.AgentService.StreamTelemetry:input_type -> netpulse.v1.TelemetryBatch
|
||
40, // 56: netpulse.v1.AgentService.StreamLogs:input_type -> netpulse.v1.LogBatch
|
||
41, // 57: netpulse.v1.AgentService.ReportDiscovery:input_type -> netpulse.v1.DiscoveryReport
|
||
42, // 58: netpulse.v1.AgentService.UploadConfig:input_type -> netpulse.v1.ConfigUpload
|
||
4, // 59: netpulse.v1.EnrollmentService.Enroll:output_type -> netpulse.v1.EnrollResponse
|
||
13, // 60: netpulse.v1.AgentService.Control:output_type -> netpulse.v1.ControlDown
|
||
43, // 61: netpulse.v1.AgentService.StreamTelemetry:output_type -> netpulse.v1.TelemetryAck
|
||
44, // 62: netpulse.v1.AgentService.StreamLogs:output_type -> netpulse.v1.LogAck
|
||
45, // 63: netpulse.v1.AgentService.ReportDiscovery:output_type -> netpulse.v1.DiscoveryAck
|
||
46, // 64: netpulse.v1.AgentService.UploadConfig:output_type -> netpulse.v1.ConfigReceipt
|
||
59, // [59:65] is the sub-list for method output_type
|
||
53, // [53:59] is the sub-list for method input_type
|
||
53, // [53:53] is the sub-list for extension type_name
|
||
53, // [53:53] is the sub-list for extension extendee
|
||
0, // [0:53] is the sub-list for field type_name
|
||
}
|
||
|
||
func init() { file_netpulse_v1_agent_proto_init() }
|
||
func file_netpulse_v1_agent_proto_init() {
|
||
if File_netpulse_v1_agent_proto != nil {
|
||
return
|
||
}
|
||
file_netpulse_v1_common_proto_init()
|
||
file_netpulse_v1_discovery_proto_init()
|
||
file_netpulse_v1_logs_proto_init()
|
||
file_netpulse_v1_ncm_proto_init()
|
||
file_netpulse_v1_telemetry_proto_init()
|
||
file_netpulse_v1_agent_proto_msgTypes[2].OneofWrappers = []any{
|
||
(*ControlUp_Hello)(nil),
|
||
(*ControlUp_Heartbeat)(nil),
|
||
(*ControlUp_TaskStatus)(nil),
|
||
(*ControlUp_ModuleStatus)(nil),
|
||
(*ControlUp_ConfigApplyResult)(nil),
|
||
(*ControlUp_CredentialRequest)(nil),
|
||
(*ControlUp_Pong)(nil),
|
||
(*ControlUp_Event)(nil),
|
||
}
|
||
file_netpulse_v1_agent_proto_msgTypes[10].OneofWrappers = []any{
|
||
(*ControlDown_Welcome)(nil),
|
||
(*ControlDown_TaskPlan)(nil),
|
||
(*ControlDown_TaskDelta)(nil),
|
||
(*ControlDown_ModuleControl)(nil),
|
||
(*ControlDown_Credentials)(nil),
|
||
(*ControlDown_ConfigJob)(nil),
|
||
(*ControlDown_ConfigApplyJob)(nil),
|
||
(*ControlDown_DiscoveryRequest)(nil),
|
||
(*ControlDown_Ping)(nil),
|
||
(*ControlDown_Directive)(nil),
|
||
}
|
||
type x struct{}
|
||
out := protoimpl.TypeBuilder{
|
||
File: protoimpl.DescBuilder{
|
||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_netpulse_v1_agent_proto_rawDesc), len(file_netpulse_v1_agent_proto_rawDesc)),
|
||
NumEnums: 3,
|
||
NumMessages: 25,
|
||
NumExtensions: 0,
|
||
NumServices: 2,
|
||
},
|
||
GoTypes: file_netpulse_v1_agent_proto_goTypes,
|
||
DependencyIndexes: file_netpulse_v1_agent_proto_depIdxs,
|
||
EnumInfos: file_netpulse_v1_agent_proto_enumTypes,
|
||
MessageInfos: file_netpulse_v1_agent_proto_msgTypes,
|
||
}.Build()
|
||
File_netpulse_v1_agent_proto = out.File
|
||
file_netpulse_v1_agent_proto_goTypes = nil
|
||
file_netpulse_v1_agent_proto_depIdxs = nil
|
||
}
|