// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.12 // protoc v7.35.1 // source: sentry/agent/v1/agent_control.proto package agentv1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" 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) ) // AgentCommand is a one-shot action, not a persistent desired state like // DesiredOverride -- delivered at-most-once (see CheckInResponse's // comment). Scoped deliberately narrow: only RESTART exists today. // STOP and UNINSTALL are real, disclosed future work, not oversights -- // both need genuine OS service-manager integration (systemd's // Restart=/RestartPreventExitStatus= semantics vs. Windows SCM recovery // options are different enough per platform that hand-waving them would // be dishonest), which RESTART doesn't: a graceful shutdown followed by // a clean process exit, relying on whatever restart policy the host's // service manager already has configured -- the same contract systemd/ // SCM already expect from any well-behaved service. type AgentCommand int32 const ( AgentCommand_AGENT_COMMAND_UNSPECIFIED AgentCommand = 0 AgentCommand_AGENT_COMMAND_RESTART AgentCommand = 1 ) // Enum value maps for AgentCommand. var ( AgentCommand_name = map[int32]string{ 0: "AGENT_COMMAND_UNSPECIFIED", 1: "AGENT_COMMAND_RESTART", } AgentCommand_value = map[string]int32{ "AGENT_COMMAND_UNSPECIFIED": 0, "AGENT_COMMAND_RESTART": 1, } ) func (x AgentCommand) Enum() *AgentCommand { p := new(AgentCommand) *p = x return p } func (x AgentCommand) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (AgentCommand) Descriptor() protoreflect.EnumDescriptor { return file_sentry_agent_v1_agent_control_proto_enumTypes[0].Descriptor() } func (AgentCommand) Type() protoreflect.EnumType { return &file_sentry_agent_v1_agent_control_proto_enumTypes[0] } func (x AgentCommand) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use AgentCommand.Descriptor instead. func (AgentCommand) EnumDescriptor() ([]byte, []int) { return file_sentry_agent_v1_agent_control_proto_rawDescGZIP(), []int{0} } // ReportedConfig is what an agent tells the platform about itself -- // read-only, for inventory/visibility. Deliberately excludes tls/ingest // endpoint fields: those are never reported and never remotely // overridable (see DesiredOverride's comment) -- reporting the ingest // endpoint back to itself would be redundant (that's exactly the // connection this request arrived over), and TLS material has no // business leaving the host at all. type ReportedConfig struct { state protoimpl.MessageState `protogen:"open.v1"` AgentVersion string `protobuf:"bytes,1,opt,name=agent_version,json=agentVersion,proto3" json:"agent_version,omitempty"` SourceKind string `protobuf:"bytes,2,opt,name=source_kind,json=sourceKind,proto3" json:"source_kind,omitempty"` // "journald", "file", "eventlog", "etw" SourceDetail string `protobuf:"bytes,3,opt,name=source_detail,json=sourceDetail,proto3" json:"source_detail,omitempty"` // human-readable summary: unit name, file path, or channel list BatchMaxSize uint64 `protobuf:"varint,4,opt,name=batch_max_size,json=batchMaxSize,proto3" json:"batch_max_size,omitempty"` BatchFlushIntervalMs uint64 `protobuf:"varint,5,opt,name=batch_flush_interval_ms,json=batchFlushIntervalMs,proto3" json:"batch_flush_interval_ms,omitempty"` HeartbeatEnabled bool `protobuf:"varint,6,opt,name=heartbeat_enabled,json=heartbeatEnabled,proto3" json:"heartbeat_enabled,omitempty"` HeartbeatIntervalMs uint64 `protobuf:"varint,7,opt,name=heartbeat_interval_ms,json=heartbeatIntervalMs,proto3" json:"heartbeat_interval_ms,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ReportedConfig) Reset() { *x = ReportedConfig{} mi := &file_sentry_agent_v1_agent_control_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *ReportedConfig) String() string { return protoimpl.X.MessageStringOf(x) } func (*ReportedConfig) ProtoMessage() {} func (x *ReportedConfig) ProtoReflect() protoreflect.Message { mi := &file_sentry_agent_v1_agent_control_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 ReportedConfig.ProtoReflect.Descriptor instead. func (*ReportedConfig) Descriptor() ([]byte, []int) { return file_sentry_agent_v1_agent_control_proto_rawDescGZIP(), []int{0} } func (x *ReportedConfig) GetAgentVersion() string { if x != nil { return x.AgentVersion } return "" } func (x *ReportedConfig) GetSourceKind() string { if x != nil { return x.SourceKind } return "" } func (x *ReportedConfig) GetSourceDetail() string { if x != nil { return x.SourceDetail } return "" } func (x *ReportedConfig) GetBatchMaxSize() uint64 { if x != nil { return x.BatchMaxSize } return 0 } func (x *ReportedConfig) GetBatchFlushIntervalMs() uint64 { if x != nil { return x.BatchFlushIntervalMs } return 0 } func (x *ReportedConfig) GetHeartbeatEnabled() bool { if x != nil { return x.HeartbeatEnabled } return false } func (x *ReportedConfig) GetHeartbeatIntervalMs() uint64 { if x != nil { return x.HeartbeatIntervalMs } return 0 } type CheckInRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` CurrentConfig *ReportedConfig `protobuf:"bytes,3,opt,name=current_config,json=currentConfig,proto3" json:"current_config,omitempty"` // The DesiredOverride.version this agent last successfully applied, // empty if it has never applied one. Lets the server distinguish // "pending" (an edit exists the agent hasn't picked up yet) from // "applied" for the web UI, without the agent needing to know // anything about that distinction itself. AppliedOverrideVersion string `protobuf:"bytes,4,opt,name=applied_override_version,json=appliedOverrideVersion,proto3" json:"applied_override_version,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *CheckInRequest) Reset() { *x = CheckInRequest{} mi := &file_sentry_agent_v1_agent_control_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *CheckInRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*CheckInRequest) ProtoMessage() {} func (x *CheckInRequest) ProtoReflect() protoreflect.Message { mi := &file_sentry_agent_v1_agent_control_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 CheckInRequest.ProtoReflect.Descriptor instead. func (*CheckInRequest) Descriptor() ([]byte, []int) { return file_sentry_agent_v1_agent_control_proto_rawDescGZIP(), []int{1} } func (x *CheckInRequest) GetHost() string { if x != nil { return x.Host } return "" } func (x *CheckInRequest) GetService() string { if x != nil { return x.Service } return "" } func (x *CheckInRequest) GetCurrentConfig() *ReportedConfig { if x != nil { return x.CurrentConfig } return nil } func (x *CheckInRequest) GetAppliedOverrideVersion() string { if x != nil { return x.AppliedOverrideVersion } return "" } // DesiredOverride is the remotely-editable subset of an agent's config // -- batch/heartbeat tuning, and, for journald sources, the unit // filter. Every field is optional: unset means "no override for this // field, keep whatever agent.toml says locally" -- a partial edit only // touches the fields it sets. Never includes tls/ingest: those stay // local-file-only, permanently, a deliberate security boundary (see // /docs/agent-management-design.md) so a bad or malicious remote edit // can never strand an agent or redirect where its logs go. type DesiredOverride struct { state protoimpl.MessageState `protogen:"open.v1"` BatchMaxSize *uint64 `protobuf:"varint,1,opt,name=batch_max_size,json=batchMaxSize,proto3,oneof" json:"batch_max_size,omitempty"` BatchFlushIntervalMs *uint64 `protobuf:"varint,2,opt,name=batch_flush_interval_ms,json=batchFlushIntervalMs,proto3,oneof" json:"batch_flush_interval_ms,omitempty"` HeartbeatEnabled *bool `protobuf:"varint,3,opt,name=heartbeat_enabled,json=heartbeatEnabled,proto3,oneof" json:"heartbeat_enabled,omitempty"` HeartbeatIntervalMs *uint64 `protobuf:"varint,4,opt,name=heartbeat_interval_ms,json=heartbeatIntervalMs,proto3,oneof" json:"heartbeat_interval_ms,omitempty"` // Only meaningful when the agent's local source is journald; ignored // otherwise. Empty string means "no unit filter" (tail the whole // journal), same semantics as the local config's own unit field. JournaldUnit *string `protobuf:"bytes,5,opt,name=journald_unit,json=journaldUnit,proto3,oneof" json:"journald_unit,omitempty"` // Opaque version stamp the platform assigns on every edit. The // agent's only obligation is to echo it back as // CheckInRequest.applied_override_version once applied -- it never // interprets the value itself. Version string `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"` // Extra file paths this agent should tail in addition to whatever its // local [source] already is -- never a replacement for the primary // source (an agent whose local source is journald can still be told // to also tail a file, and vice versa). Unlike every field above, // there's no real "unset" state for a list: the web UI/CLI always // resubmit the complete desired list on every edit (same "PUT // replaces the whole override" convention every other field already // follows -- see api/agents/handler.go's handleSetConfig), so an // empty list unambiguously means "no extra paths right now," not // "don't touch this." ExtraFilePaths []string `protobuf:"bytes,7,rep,name=extra_file_paths,json=extraFilePaths,proto3" json:"extra_file_paths,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *DesiredOverride) Reset() { *x = DesiredOverride{} mi := &file_sentry_agent_v1_agent_control_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *DesiredOverride) String() string { return protoimpl.X.MessageStringOf(x) } func (*DesiredOverride) ProtoMessage() {} func (x *DesiredOverride) ProtoReflect() protoreflect.Message { mi := &file_sentry_agent_v1_agent_control_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 DesiredOverride.ProtoReflect.Descriptor instead. func (*DesiredOverride) Descriptor() ([]byte, []int) { return file_sentry_agent_v1_agent_control_proto_rawDescGZIP(), []int{2} } func (x *DesiredOverride) GetBatchMaxSize() uint64 { if x != nil && x.BatchMaxSize != nil { return *x.BatchMaxSize } return 0 } func (x *DesiredOverride) GetBatchFlushIntervalMs() uint64 { if x != nil && x.BatchFlushIntervalMs != nil { return *x.BatchFlushIntervalMs } return 0 } func (x *DesiredOverride) GetHeartbeatEnabled() bool { if x != nil && x.HeartbeatEnabled != nil { return *x.HeartbeatEnabled } return false } func (x *DesiredOverride) GetHeartbeatIntervalMs() uint64 { if x != nil && x.HeartbeatIntervalMs != nil { return *x.HeartbeatIntervalMs } return 0 } func (x *DesiredOverride) GetJournaldUnit() string { if x != nil && x.JournaldUnit != nil { return *x.JournaldUnit } return "" } func (x *DesiredOverride) GetVersion() string { if x != nil { return x.Version } return "" } func (x *DesiredOverride) GetExtraFilePaths() []string { if x != nil { return x.ExtraFilePaths } return nil } type CheckInResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // False when no override has ever been set for this agent -- it // should be running whatever agent.toml already has, untouched. HasOverride bool `protobuf:"varint,1,opt,name=has_override,json=hasOverride,proto3" json:"has_override,omitempty"` Override *DesiredOverride `protobuf:"bytes,2,opt,name=override,proto3" json:"override,omitempty"` // AGENT_COMMAND_UNSPECIFIED when there's nothing to do. Unlike // DesiredOverride, there is no "applied_command_version" echoed back // in CheckInRequest: the server clears a pending command the moment // it hands it out in a response (see // ingest/internal/agentregistry.Registry.CheckIn), not once the agent // confirms execution -- a restarting agent's process is gone before // it could ever send that confirmation. This is an honest at-most- // once delivery, not at-least-once: a command lost to a network // failure between this response and the agent acting on it is simply // lost, same as any fire-and-forget signal. Re-issuing (PUT // /agents/{host}/command again) is the operator's recourse, same as // it would be for a `systemctl restart` that silently failed to reach // its target. PendingCommand AgentCommand `protobuf:"varint,3,opt,name=pending_command,json=pendingCommand,proto3,enum=sentry.agent.v1.AgentCommand" json:"pending_command,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *CheckInResponse) Reset() { *x = CheckInResponse{} mi := &file_sentry_agent_v1_agent_control_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *CheckInResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*CheckInResponse) ProtoMessage() {} func (x *CheckInResponse) ProtoReflect() protoreflect.Message { mi := &file_sentry_agent_v1_agent_control_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 CheckInResponse.ProtoReflect.Descriptor instead. func (*CheckInResponse) Descriptor() ([]byte, []int) { return file_sentry_agent_v1_agent_control_proto_rawDescGZIP(), []int{3} } func (x *CheckInResponse) GetHasOverride() bool { if x != nil { return x.HasOverride } return false } func (x *CheckInResponse) GetOverride() *DesiredOverride { if x != nil { return x.Override } return nil } func (x *CheckInResponse) GetPendingCommand() AgentCommand { if x != nil { return x.PendingCommand } return AgentCommand_AGENT_COMMAND_UNSPECIFIED } var File_sentry_agent_v1_agent_control_proto protoreflect.FileDescriptor const file_sentry_agent_v1_agent_control_proto_rawDesc = "" + "\n" + "#sentry/agent/v1/agent_control.proto\x12\x0fsentry.agent.v1\"\xb9\x02\n" + "\x0eReportedConfig\x12#\n" + "\ragent_version\x18\x01 \x01(\tR\fagentVersion\x12\x1f\n" + "\vsource_kind\x18\x02 \x01(\tR\n" + "sourceKind\x12#\n" + "\rsource_detail\x18\x03 \x01(\tR\fsourceDetail\x12$\n" + "\x0ebatch_max_size\x18\x04 \x01(\x04R\fbatchMaxSize\x125\n" + "\x17batch_flush_interval_ms\x18\x05 \x01(\x04R\x14batchFlushIntervalMs\x12+\n" + "\x11heartbeat_enabled\x18\x06 \x01(\bR\x10heartbeatEnabled\x122\n" + "\x15heartbeat_interval_ms\x18\a \x01(\x04R\x13heartbeatIntervalMs\"\xc0\x01\n" + "\x0eCheckInRequest\x12\x12\n" + "\x04host\x18\x01 \x01(\tR\x04host\x12\x18\n" + "\aservice\x18\x02 \x01(\tR\aservice\x12F\n" + "\x0ecurrent_config\x18\x03 \x01(\v2\x1f.sentry.agent.v1.ReportedConfigR\rcurrentConfig\x128\n" + "\x18applied_override_version\x18\x04 \x01(\tR\x16appliedOverrideVersion\"\xc2\x03\n" + "\x0fDesiredOverride\x12)\n" + "\x0ebatch_max_size\x18\x01 \x01(\x04H\x00R\fbatchMaxSize\x88\x01\x01\x12:\n" + "\x17batch_flush_interval_ms\x18\x02 \x01(\x04H\x01R\x14batchFlushIntervalMs\x88\x01\x01\x120\n" + "\x11heartbeat_enabled\x18\x03 \x01(\bH\x02R\x10heartbeatEnabled\x88\x01\x01\x127\n" + "\x15heartbeat_interval_ms\x18\x04 \x01(\x04H\x03R\x13heartbeatIntervalMs\x88\x01\x01\x12(\n" + "\rjournald_unit\x18\x05 \x01(\tH\x04R\fjournaldUnit\x88\x01\x01\x12\x18\n" + "\aversion\x18\x06 \x01(\tR\aversion\x12(\n" + "\x10extra_file_paths\x18\a \x03(\tR\x0eextraFilePathsB\x11\n" + "\x0f_batch_max_sizeB\x1a\n" + "\x18_batch_flush_interval_msB\x14\n" + "\x12_heartbeat_enabledB\x18\n" + "\x16_heartbeat_interval_msB\x10\n" + "\x0e_journald_unit\"\xba\x01\n" + "\x0fCheckInResponse\x12!\n" + "\fhas_override\x18\x01 \x01(\bR\vhasOverride\x12<\n" + "\boverride\x18\x02 \x01(\v2 .sentry.agent.v1.DesiredOverrideR\boverride\x12F\n" + "\x0fpending_command\x18\x03 \x01(\x0e2\x1d.sentry.agent.v1.AgentCommandR\x0ependingCommand*H\n" + "\fAgentCommand\x12\x1d\n" + "\x19AGENT_COMMAND_UNSPECIFIED\x10\x00\x12\x19\n" + "\x15AGENT_COMMAND_RESTART\x10\x012\\\n" + "\fAgentControl\x12L\n" + "\aCheckIn\x12\x1f.sentry.agent.v1.CheckInRequest\x1a .sentry.agent.v1.CheckInResponseB8Z6github.com/sentry/sentry/proto/sentry/agent/v1;agentv1b\x06proto3" var ( file_sentry_agent_v1_agent_control_proto_rawDescOnce sync.Once file_sentry_agent_v1_agent_control_proto_rawDescData []byte ) func file_sentry_agent_v1_agent_control_proto_rawDescGZIP() []byte { file_sentry_agent_v1_agent_control_proto_rawDescOnce.Do(func() { file_sentry_agent_v1_agent_control_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_sentry_agent_v1_agent_control_proto_rawDesc), len(file_sentry_agent_v1_agent_control_proto_rawDesc))) }) return file_sentry_agent_v1_agent_control_proto_rawDescData } var file_sentry_agent_v1_agent_control_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_sentry_agent_v1_agent_control_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_sentry_agent_v1_agent_control_proto_goTypes = []any{ (AgentCommand)(0), // 0: sentry.agent.v1.AgentCommand (*ReportedConfig)(nil), // 1: sentry.agent.v1.ReportedConfig (*CheckInRequest)(nil), // 2: sentry.agent.v1.CheckInRequest (*DesiredOverride)(nil), // 3: sentry.agent.v1.DesiredOverride (*CheckInResponse)(nil), // 4: sentry.agent.v1.CheckInResponse } var file_sentry_agent_v1_agent_control_proto_depIdxs = []int32{ 1, // 0: sentry.agent.v1.CheckInRequest.current_config:type_name -> sentry.agent.v1.ReportedConfig 3, // 1: sentry.agent.v1.CheckInResponse.override:type_name -> sentry.agent.v1.DesiredOverride 0, // 2: sentry.agent.v1.CheckInResponse.pending_command:type_name -> sentry.agent.v1.AgentCommand 2, // 3: sentry.agent.v1.AgentControl.CheckIn:input_type -> sentry.agent.v1.CheckInRequest 4, // 4: sentry.agent.v1.AgentControl.CheckIn:output_type -> sentry.agent.v1.CheckInResponse 4, // [4:5] is the sub-list for method output_type 3, // [3:4] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name 3, // [3:3] is the sub-list for extension extendee 0, // [0:3] is the sub-list for field type_name } func init() { file_sentry_agent_v1_agent_control_proto_init() } func file_sentry_agent_v1_agent_control_proto_init() { if File_sentry_agent_v1_agent_control_proto != nil { return } file_sentry_agent_v1_agent_control_proto_msgTypes[2].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_sentry_agent_v1_agent_control_proto_rawDesc), len(file_sentry_agent_v1_agent_control_proto_rawDesc)), NumEnums: 1, NumMessages: 4, NumExtensions: 0, NumServices: 1, }, GoTypes: file_sentry_agent_v1_agent_control_proto_goTypes, DependencyIndexes: file_sentry_agent_v1_agent_control_proto_depIdxs, EnumInfos: file_sentry_agent_v1_agent_control_proto_enumTypes, MessageInfos: file_sentry_agent_v1_agent_control_proto_msgTypes, }.Build() File_sentry_agent_v1_agent_control_proto = out.File file_sentry_agent_v1_agent_control_proto_goTypes = nil file_sentry_agent_v1_agent_control_proto_depIdxs = nil }